Hi All,
I have the following in my master page:
In my code behind on the content page of page load I want to change the class="hide" to class="show" How can I do that?Code:<span id="Quote" class="hide">..........
Printable View
Hi All,
I have the following in my master page:
In my code behind on the content page of page load I want to change the class="hide" to class="show" How can I do that?Code:<span id="Quote" class="hide">..........
Code:Quote.Attributes["Class"] = "Show";
Easiest way, put a runat="server" to your span and in page load do:
Quote.Attributes.Add("class", "Show") .
But i must ask why you want to change your class in page load?Doesn't make sense to me.
Ok I have added a runat="server" to my span in the master page.
In the contentpage aspx file I have added a MasterType with VirtualPath set.
In the page_load event of my content page, when I enter the id of the span class "Quote" I get no intellisense and a red line stating that Quote doesn't exist in the current context.
Ye you got me confused now.You add the span in your master page and you expect it to be found in another page?Or what?
I forgot to put in the MasterType directive in the aspx page