P
Patxi
Hi,
I've created a class inheriting System.Web.UI.Page, and all this stuff I
was doing worked until now...
I want to setup some 'global' meta values, doing this:
HtmlLink link = new HtmlLink();
link.Attributes.Add("type", "text/css");
link.Attributes.Add("rel", "stylesheet");
link.Attributes.Add("href", "~/newstyle.css");
this.Header.Controls.Add(link);
I have this error on an aspx.cs inheriting my class instead of
System.Web.UI.Page:
Exception Details: System.NullReferenceException: Object reference not
set to an instance of an object.
Source Error:
Line 176: link.Attributes.Add("href", "~/newstyle.css");
Line 177: this.Page.Header.Controls.Add(link);
It would be really nice if I could render all meta stuff in my base
class without calling it from page.aspx.cs...
TIA
I've created a class inheriting System.Web.UI.Page, and all this stuff I
was doing worked until now...
I want to setup some 'global' meta values, doing this:
HtmlLink link = new HtmlLink();
link.Attributes.Add("type", "text/css");
link.Attributes.Add("rel", "stylesheet");
link.Attributes.Add("href", "~/newstyle.css");
this.Header.Controls.Add(link);
I have this error on an aspx.cs inheriting my class instead of
System.Web.UI.Page:
Exception Details: System.NullReferenceException: Object reference not
set to an instance of an object.
Source Error:
Line 176: link.Attributes.Add("href", "~/newstyle.css");
Line 177: this.Page.Header.Controls.Add(link);
It would be really nice if I could render all meta stuff in my base
class without calling it from page.aspx.cs...
TIA