The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Events and RegisterClientScriptBlock
Posted: 30 Apr 09 2:25 PM
|
Which event (from a User control perspective devired from EntityBoundSmartPartInfoProvider) is like page_load ? is it OnLoad(). if so, can i use the Page.IsPostBack boolean to not recreate and reinit controls on postbacks...
also, where do i invoke RegisterClientScriptBlock in this case. I dont have access to ScriptManager or ClientScript? |
|
|
|
Re: Events and RegisterClientScriptBlock
Posted: 01 May 09 3:35 AM
|
Yes, OnLoad is similar - Page_Load would be from the Page as a whole (the aspx and master page etc), OnLoad would be from your control (ascx) I think.
You can use Page.IsPostBack boolean to do whatever you want - when you say not recreate/reinit what exactly do you not want to do with the control?
ClientScriptBlock registration should always use ScriptManager (ajax aware..) - all the quickforms have access to this - it may not be in Intellisense in App Architect but you can use it. |
|
|
|
Re: Events and RegisterClientScriptBlock
Posted: 01 May 09 9:23 AM
|
Thanks Nick. I actually put messages in the event to figure out the firing order. I have that part working, but what I dont have working is injecting Javascript into the Page from my user control. If i try to reference ScriptManager, then I cant compile the control in VS (Not sure what dll if any to reference)
|
|
|
|
Re: Events and RegisterClientScriptBlock
Posted: 01 May 09 9:29 AM
|
Ah, when you said user control I though you meant custom smartpart. The dll I believe you need is System.Web.UI - although the way you are using it is new to me so I dont know if it will work or not. So try adding System.Web.UI as a reference. |
|
|
| |
|