Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Master page and user control

Status
Not open for further replies.

TheCivic

Programmer
Feb 7, 2006
34
GB
Hi everyone,

I have created a Master Page and set a content page to it, that is all fine.

On my content page i add a user control, which registers javascript using

If Not (Page.IsClientScriptBlockRegistered("js")) Then
Page.RegisterClientScriptBlock("js", jsFunc)
End If

But for some reason the javascript doesnt appear in the source file, once the page is a content page of a master file.

If i create the same page, but dont set the page to be a content page of a master file, then it works fine.

Have i got to use something else rather then Page.IsClientScriptBlockRegistered??

Also, if i create a property on my master page to change the html title, the content page wont find the master page property??!! HELP!!

Thanks in advanced.
 
How are you setting the content page to the master page?

Where are you trying the register the javascript?
 
The content is set in the page directive.

The javascript is created from within the user control on the Page_Load event.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top