J
Jeremy McPeak
Howdy.
First of all, awesome job on .NET 2.0! Now to my question:
I love Master Pages and the Page.ClientScript; however, I am having trouble
getting the two to play together. I can build a simple .aspx page (no master
page) and add in JavaScript with RegisterClientScriptBlock() with no
problems. However, when I move the same code over to a content page (or a
master page), the client script is not added to the page. Are there other
steps required to get the two to play together? Is this working as intended,
or am I a moron? The code I'm using is simple:
string myScript = @"function doThis() { alert('Hello, World!');} doThis();
";
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "myscript",
myScript, true);
Thanks!
First of all, awesome job on .NET 2.0! Now to my question:
I love Master Pages and the Page.ClientScript; however, I am having trouble
getting the two to play together. I can build a simple .aspx page (no master
page) and add in JavaScript with RegisterClientScriptBlock() with no
problems. However, when I move the same code over to a content page (or a
master page), the client script is not added to the page. Are there other
steps required to get the two to play together? Is this working as intended,
or am I a moron? The code I'm using is simple:
string myScript = @"function doThis() { alert('Hello, World!');} doThis();
";
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "myscript",
myScript, true);
Thanks!