Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > RegisterClientScriptBlock in PreRender

Reply
Thread Tools

RegisterClientScriptBlock in PreRender

 
 
Jon Paugh
Guest
Posts: n/a
 
      11-19-2003
I noticed that if in my WebControl derived class I call
RegisterClientScriptBlock in my Render method I don't see
the javascript, but if I call it from PreRender, I do see
the javascript in my html page. I would love to know
why ?
 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      11-20-2003
Because those scripts are rendered when Page passes to Render phase, so
calling RegisterXXX methods in Render is too late for them gettting to
outputted (because Page has already prepared them)

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist


"Jon Paugh" <(E-Mail Removed)> wrote in message
news:035e01c3aee9$bc350470$(E-Mail Removed)...
> I noticed that if in my WebControl derived class I call
> RegisterClientScriptBlock in my Render method I don't see
> the javascript, but if I call it from PreRender, I do see
> the javascript in my html page. I would love to know
> why ?



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is RegisterClientScriptBlock?? RegisterScripts etc. MS News ASP .Net 10 08-06-2003 02:24 AM
Styles not being applied with RegisterClientScriptBlock Scott ASP .Net 0 07-27-2003 12:23 AM
control equivalent to Page.RegisterClientScriptBlock? John Livermore ASP .Net 1 07-25-2003 01:44 PM
RegisterClientScriptBlock to register OUTSIDE form tags Wes Weems ASP .Net 1 07-19-2003 07:04 PM
Re: RegisterClientScriptBlock & RegisterStartupScript revisited Brian W ASP .Net 1 07-04-2003 01:43 AM



Advertisments