Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 07, 2012 01:19 AM by Decker Dong - MSFT
0 Points
1 Post
Jan 05, 2012 01:00 AM|LINK
Hi
Supposing the following CC declaration
<konnektix:RegisterScriptControl ID="RegisterScriptControl1" runat="server"> Hello world </konnektix:RegisterScriptControl>
I would like to display an alert box when this control is loaded with :
protected override void Render(HtmlTextWriter htmlTextWriter) { ScriptManager.RegisterStartupScript(this, typeof(RegisterScriptControl), UniqueID, "alert('" + XXXXXXXXXXXXXXXX + "');", true); }
How can I replace XXXXXXXXXXX with my control inner content (Hello world) ? Thanks !
All-Star
118619 Points
18779 Posts
Jan 07, 2012 01:19 AM|LINK
Hello:)
It should have a public property like Text or something like ViewState to save "Hello Word" in order to avoid its losing。So what you do at present is to find it out in the property panel,and then replace "XXXX" with the property。
Best reguards!
reeax
0 Points
1 Post
How to access custom control inner content ?
Jan 05, 2012 01:00 AM|LINK
Hi
Supposing the following CC declaration
I would like to display an alert box when this control is loaded with :
protected override void Render(HtmlTextWriter htmlTextWriter) { ScriptManager.RegisterStartupScript(this, typeof(RegisterScriptControl), UniqueID, "alert('" + XXXXXXXXXXXXXXXX + "');", true); }How can I replace XXXXXXXXXXX with my control inner content (Hello world) ? Thanks !
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: How to access custom control inner content ?
Jan 07, 2012 01:19 AM|LINK
Hello:)
It should have a public property like Text or something like ViewState to save "Hello Word" in order to avoid its losing。So what you do at present is to find it out in the property panel,and then replace "XXXX" with the property。
Best reguards!