I am using ASP.NET webforms on the .NET 3.5 framework. How can I achieve a custom attribute in the HTML tag such as:
<HTML lang="en">
I want to achieve this in the code behind on a common inherited base page. The attribute value would dynamically set based on a session value everytime a page is loaded.
Late addition: I want to achieve this without any ASP page changes to script tags if possible
Question is old but may be of use to someone. Here's what I did..
In code behind :
In ASP.NET PAGE
I was working with
Local Resources
for each language & cultures also so I found this to be a better solution.Also, because I was using a Master page, I had to add it only once.
I use this to set the language I'm using in my code: