Board index » Web Programming » Can't set value to the property "Width" of my custom webcontrol
|
jkartush
|
Can't set value to the property "Width" of my custom webcontrol
Web Programming66
This is a multi-part message in MIME format. ------=_NextPart_000_003D_01C83334.07BF4270 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable =20 In webform.aspx: <cc:ctlB ID=3D"ctl1" runat=3D"server" Width=3D"200px" = /> If set value to width property, I will get a error that say ctlB.Page is = null. This control will be fine with no width property, why? Could anybody help me ? thanks ctlA.cs ---------------------------- [ AspNetHostingPermission(SecurityAction.Demand, Level =3D = AspNetHostingPermissionLevel.Minimal), AspNetHostingPermission(SecurityAction.InheritanceDemand, Level =3D = AspNetHostingPermissionLevel.Minimal), DefaultProperty("Text"), ValidationProperty("Text"), ToolboxData("<{0}:ctlA runat=3D\"server\"></{0}:ctlA>") ] public class ctlA : WebControl, INamingContainer { protected TextBox _textBox; protected HiddenField _hiddenBox; [Bindable(false), DefaultValue(""), = TypeConverter(typeof(UnitConverter))] public override Unit Width { get { EnsureChildControls(); return this._textBox.Width; } set { EnsureChildControls(); this._textBox.Width =3D value; } } public override bool EnableViewState { get { EnsureChildControls(); return this._textBox.EnableViewState; } set { EnsureChildControls(); this._textBox.EnableViewState =3D value; this._hiddenBox.EnableViewState =3D value; this.EnableViewState =3D value; } } protected override void CreateChildControls() { this._textBox =3D new TextBox(); this._textBox.ID =3D "Name"; this._textBox.ReadOnly =3D this.ReadOnly; this._hiddenBox =3D new HiddenField(); this._hiddenBox.ID =3D "Value"; this.Controls.Add(this._textBox); this.Controls.Add(this._hiddenBox); } protected override void Render(HtmlTextWriter writer) { EnsureChildControls(); base.Render(writer); } public override ControlCollection Controls { get { EnsureChildControls(); return base.Controls; } } public ctlA() : base(HtmlTextWriterTag.Span) { } } -------------------------------------------------------------------------= ------- ctlB.cs ------------------------------ [ToolboxData("<{0}:ctlB runat=3D\"server\"></{0}:ctlB>")] public class ctlB : ctlA { internal Image _schImage; public ctlB() : base() { } protected override void CreateChildControls() { base.CreateChildControls(); this._schImage =3D new Image(); this._schImage.ID =3D "imgButton"; this._schImage.Attributes["align"] =3D "absmiddle"; this._schImage.Attributes["onclick"] =3D = String.Format("__OpenDialog('{0}', null, {1}, {2}, '{3}', '{4}', {5});", Page.ResolveUrl(this.DialogPagePath), = this.DialogWidth.ToString(), this.DialogHeight.ToString(), = this._textBox.ClientID, this._hiddenBox.ClientID, (this.DialogMode = =3D=3D DialogMode.Model) ? "true" : "false"); this.Controls.Add(_schImage); } protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); = this.Page.ClientScript.RegisterClientScriptResource(this.GetType(), = "OpenDialog.js"); } public override ControlCollection Controls { get { EnsureChildControls(); return base.Controls; } } } ------=_NextPart_000_003D_01C83334.07BF4270 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; charset=3Dgb2312"> <META content=3D"MSHTML 6.00.6000.16546" name=3DGENERATOR> <STYLE></STYLE> </HEAD><FONT face=3DArial><FONT size=3D2> <BODY> <DIV> <DIV><FONT size=3D3><FONT size=3D2>In webform.aspx: <FONT=20 color=3D#800000><cc:ctlB ID=3D"ctl1" = runat=3D"server" Width=3D"200px"=20 /></FONT></FONT></DIV> <DIV><FONT size=3D3></FONT> </DIV> <DIV><FONT size=3D3>If set value to width property, I will get a error = that say=20 ctlB.Page is null. This control will be fine with no width property,=20 why?</FONT></DIV> <DIV><FONT size=3D3></FONT> </DIV> <DIV><FONT size=3D3>Could anybody help me ? thanks</FONT></DIV> <DIV><FONT size=3D3></FONT> </DIV> <DIV><FONT size=3D3></FONT> </DIV> <DIV><FONT size=3D3></FONT> </DIV></FONT> <DIV><STRONG><FONT size=3D3>ctlA.cs</FONT></STRONG></DIV> <DIV><STRONG><FONT = size=3D3>----------------------------</FONT></STRONG></DIV> <DIV>[<BR>AspNetHostingPermission(SecurityAction.Demand, Level <SPAN=20 style=3D"COLOR: #000000">=3D</SPAN><SPAN style=3D"COLOR: #000000">=20 AspNetHostingPermissionLevel.Minimal),<BR>AspNetHostingPermission(Securit= yAction.InheritanceDemand,=20 Level </SPAN><SPAN style=3D"COLOR: #000000">=3D</SPAN><SPAN = style=3D"COLOR: #000000">=20 AspNetHostingPermissionLevel.Minimal),<BR>DefaultProperty(</SPAN><SPAN=20 style=3D"COLOR: #800000">"</SPAN><SPAN style=3D"COLOR: = #800000">Text</SPAN><SPAN=20 style=3D"COLOR: #800000">"</SPAN><SPAN=20 style=3D"COLOR: #000000">),<BR>ValidationProperty(</SPAN><SPAN=20 style=3D"COLOR: #800000">"</SPAN><SPAN style=3D"COLOR: = #800000">Text</SPAN><SPAN=20 style=3D"COLOR: #800000">"</SPAN><SPAN=20 style=3D"COLOR: #000000">),<BR>ToolboxData(</SPAN><SPAN=20 style=3D"COLOR: #800000">"</SPAN><SPAN style=3D"COLOR: = #800000"><{0}:ctlA=20 runat=3D\"server\"> </{0}:ctlA></SPAN><SPAN=20 style=3D"COLOR: #800000">"</SPAN><SPAN=20 style=3D"COLOR: #000000">)<BR>]<BR></SPAN><SPAN=20 style=3D"COLOR: #0000ff">public</SPAN><SPAN style=3D"COLOR: #000000">= </SPAN><SPAN=20 style=3D"COLOR: #0000ff">class</SPAN><SPAN style=3D"COLOR: #000000">= ctlA :=20 WebControl, INamingContainer<BR>{<BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">protected</SPAN><SPAN style=3D"COLOR: #000000">= TextBox=20 _textBox;<BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">protected</SPAN><SPAN style=3D"COLOR: #000000">= HiddenField=20 _hiddenBox;<BR><BR> [Bindable(</SPAN><SPAN=20 style=3D"COLOR: #0000ff">false</SPAN><SPAN style=3D"COLOR: #000000">),=20 DefaultValue(</SPAN><SPAN style=3D"COLOR: #800000">""</SPAN><SPAN=20 style=3D"COLOR: #000000">), TypeConverter(</SPAN><SPAN=20 style=3D"COLOR: #0000ff">typeof</SPAN><SPAN=20 style=3D"COLOR: #000000">(UnitConverter))]<BR> = </SPAN><SPAN=20 style=3D"COLOR: #0000ff">public</SPAN><SPAN style=3D"COLOR: #000000">= </SPAN><SPAN=20 style=3D"COLOR: #0000ff">override</SPAN><SPAN style=3D"COLOR: #000000">= Unit=20 Width<BR> = {<BR> =20 </SPAN><SPAN style=3D"COLOR: #0000ff">get</SPAN><SPAN=20 style=3D"COLOR: #000000"><BR> =20 {<BR> =20 EnsureChildControls();<BR>  = ; =20 </SPAN><SPAN style=3D"COLOR: #0000ff">return</SPAN><SPAN style=3D"COLOR: = #000000">=20 </SPAN><SPAN style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: = #000000">._textBox.Width;<BR> =20 }<BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">set</SPAN><SPAN=20 style=3D"COLOR: #000000"><BR> =20 {<BR> =20 EnsureChildControls();<BR>  = ; =20 </SPAN><SPAN style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: #000000">._textBox.Width </SPAN><SPAN=20 style=3D"COLOR: #000000">=3D</SPAN><SPAN style=3D"COLOR: #000000">=20 value;<BR> = }<BR> =20 }<BR><BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">public</SPAN><SPAN style=3D"COLOR: #000000">= </SPAN><SPAN=20 style=3D"COLOR: #0000ff">override</SPAN><SPAN style=3D"COLOR: #000000">= </SPAN><SPAN=20 style=3D"COLOR: #0000ff">bool</SPAN><SPAN style=3D"COLOR: #000000">=20 EnableViewState<BR> =20 {<BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">get</SPAN><SPAN=20 style=3D"COLOR: #000000"><BR> =20 {<BR> =20 EnsureChildControls();<BR>  = ; =20 </SPAN><SPAN style=3D"COLOR: #0000ff">return</SPAN><SPAN style=3D"COLOR: = #000000">=20 </SPAN><SPAN style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: = #000000">._textBox.EnableViewState;<BR> &nbs= p; =20 }<BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">set</SPAN><SPAN=20 style=3D"COLOR: #000000"><BR> =20 {<BR> =20 EnsureChildControls();<BR>  = ; =20 </SPAN><SPAN style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: #000000">._textBox.EnableViewState </SPAN><SPAN=20 style=3D"COLOR: #000000">=3D</SPAN><SPAN style=3D"COLOR: #000000">=20 value;<BR> &nb= sp;=20 </SPAN><SPAN style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: #000000">._hiddenBox.EnableViewState </SPAN><SPAN=20 style=3D"COLOR: #000000">=3D</SPAN><SPAN style=3D"COLOR: #000000">=20 value;<BR> &nb= sp;=20 </SPAN><SPAN style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: #000000">.EnableViewState </SPAN><SPAN=20 style=3D"COLOR: #000000">=3D</SPAN><SPAN style=3D"COLOR: #000000">=20 value;<BR> = }<BR> =20 }<BR><BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">protected</SPAN><SPAN style=3D"COLOR: #000000">= </SPAN><SPAN style=3D"COLOR: #0000ff">override</SPAN><SPAN = style=3D"COLOR: #000000">=20 </SPAN><SPAN style=3D"COLOR: #0000ff">void</SPAN><SPAN style=3D"COLOR: = #000000">=20 CreateChildControls()<BR> =20 {<BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">this</SPAN><SPAN style=3D"COLOR: = #000000">._textBox=20 </SPAN><SPAN style=3D"COLOR: #000000">=3D</SPAN><SPAN style=3D"COLOR: = #000000">=20 </SPAN><SPAN style=3D"COLOR: #0000ff">new</SPAN><SPAN style=3D"COLOR: = #000000">=20 TextBox();<BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">this</SPAN><SPAN style=3D"COLOR: = #000000">._textBox.ID=20 </SPAN><SPAN style=3D"COLOR: #000000">=3D</SPAN><SPAN style=3D"COLOR: = #000000">=20 </SPAN><SPAN style=3D"COLOR: #800000">"</SPAN><SPAN=20 style=3D"COLOR: #800000">Name</SPAN><SPAN style=3D"COLOR: = #800000">"</SPAN><SPAN=20 style=3D"COLOR: #000000">;<BR> = </SPAN><SPAN style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: #000000">._textBox.ReadOnly </SPAN><SPAN=20 style=3D"COLOR: #000000">=3D</SPAN><SPAN style=3D"COLOR: #000000">= </SPAN><SPAN=20 style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: = #000000">.ReadOnly;<BR> =20 </SPAN><SPAN style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: #000000">._hiddenBox </SPAN><SPAN=20 style=3D"COLOR: #000000">=3D</SPAN><SPAN style=3D"COLOR: #000000">= </SPAN><SPAN=20 style=3D"COLOR: #0000ff">new</SPAN><SPAN style=3D"COLOR: #000000">=20 HiddenField();<BR> = </SPAN><SPAN=20 style=3D"COLOR: #0000ff">this</SPAN><SPAN style=3D"COLOR: = #000000">._hiddenBox.ID=20 </SPAN><SPAN style=3D"COLOR: #000000">=3D</SPAN><SPAN style=3D"COLOR: = #000000">=20 </SPAN><SPAN style=3D"COLOR: #800000">"</SPAN><SPAN=20 style=3D"COLOR: #800000">Value</SPAN><SPAN style=3D"COLOR: = #800000">"</SPAN><SPAN=20 style=3D"COLOR: = #000000">;<BR><BR> =20 </SPAN><SPAN style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: #000000">.Controls.Add(</SPAN><SPAN=20 style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: = #000000">._textBox);<BR> =20 </SPAN><SPAN style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: #000000">.Controls.Add(</SPAN><SPAN=20 style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: #000000">._hiddenBox);<BR> =20 }<BR><BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">protected</SPAN><SPAN style=3D"COLOR: #000000">= </SPAN><SPAN style=3D"COLOR: #0000ff">override</SPAN><SPAN = style=3D"COLOR: #000000">=20 </SPAN><SPAN style=3D"COLOR: #0000ff">void</SPAN><SPAN style=3D"COLOR: = #000000">=20 Render(HtmlTextWriter writer)<BR> =20 {<BR> =20 EnsureChildControls();<BR> =20 </SPAN><SPAN style=3D"COLOR: #0000ff">base</SPAN><SPAN=20 style=3D"COLOR: #000000">.Render(writer);<BR> =20 }<BR><BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">public</SPAN><SPAN style=3D"COLOR: #000000">= </SPAN><SPAN=20 style=3D"COLOR: #0000ff">override</SPAN><SPAN style=3D"COLOR: #000000">=20 ControlCollection Controls<BR> =20 {<BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">get</SPAN><SPAN=20 style=3D"COLOR: #000000"><BR> =20 {<BR> =20 EnsureChildControls();<BR>  = ; =20 </SPAN><SPAN style=3D"COLOR: #0000ff">return</SPAN><SPAN style=3D"COLOR: = #000000">=20 </SPAN><SPAN style=3D"COLOR: #0000ff">base</SPAN><SPAN=20 style=3D"COLOR: = #000000">.Controls;<BR> =20 }<BR> }<BR><BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">public</SPAN><SPAN style=3D"COLOR: #000000">=20 ctlA()<BR> : </SPAN><SPAN=20 style=3D"COLOR: #0000ff">base</SPAN><SPAN=20 style=3D"COLOR: #000000">(HtmlTextWriterTag.Span)<BR> =20 {<BR> }<BR>}<BR></SPAN></DIV> <DIV><SPAN style=3D"COLOR: #000000"> <HR> </SPAN></DIV> <DIV><SPAN style=3D"COLOR: #000000"><STRONG><FONT=20 size=3D3>ctlB.cs</FONT></STRONG></SPAN></DIV> <DIV><SPAN style=3D"COLOR: #000000"><STRONG><FONT=20 size=3D3>------------------------------</FONT></STRONG></SPAN></DIV> <DIV><SPAN style=3D"COLOR: #000000"></SPAN> </DIV> <DIV><SPAN style=3D"COLOR: #000000">[ToolboxData(<SPAN=20 style=3D"COLOR: #800000">"</SPAN><SPAN style=3D"COLOR: = #800000"><{0}:ctlB=20 runat=3D\"server\"> </{0}:ctlB></SPAN><SPAN=20 style=3D"COLOR: #800000">"</SPAN><SPAN style=3D"COLOR: = #000000">)]<BR></SPAN><SPAN=20 style=3D"COLOR: #0000ff">public</SPAN><SPAN style=3D"COLOR: #000000">= </SPAN><SPAN=20 style=3D"COLOR: #0000ff">class</SPAN><SPAN style=3D"COLOR: #000000">= ctlB :=20 ctlA<BR>{<BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">internal</SPAN><SPAN style=3D"COLOR: #000000">= Image=20 _schImage;<BR><BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">public</SPAN><SPAN style=3D"COLOR: #000000">=20 ctlB()<BR> : </SPAN><SPAN=20 style=3D"COLOR: #0000ff">base</SPAN><SPAN=20 style=3D"COLOR: #000000">()<BR> = {<BR> =20 }<BR><BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">protected</SPAN><SPAN style=3D"COLOR: #000000">= </SPAN><SPAN style=3D"COLOR: #0000ff">override</SPAN><SPAN = style=3D"COLOR: #000000">=20 </SPAN><SPAN style=3D"COLOR: #0000ff">void</SPAN><SPAN style=3D"COLOR: = #000000">=20 CreateChildControls()<BR> =20 {<BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">base</SPAN><SPAN=20 style=3D"COLOR: = #000000">.CreateChildControls();<BR><BR> &nb= sp; =20 </SPAN><SPAN style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: #000000">._schImage </SPAN><SPAN=20 style=3D"COLOR: #000000">=3D</SPAN><SPAN style=3D"COLOR: #000000">= </SPAN><SPAN=20 style=3D"COLOR: #0000ff">new</SPAN><SPAN style=3D"COLOR: #000000">=20 Image();<BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">this</SPAN><SPAN style=3D"COLOR: = #000000">._schImage.ID=20 </SPAN><SPAN style=3D"COLOR: #000000">=3D</SPAN><SPAN style=3D"COLOR: = #000000">=20 </SPAN><SPAN style=3D"COLOR: #800000">"</SPAN><SPAN=20 style=3D"COLOR: #800000">imgButton</SPAN><SPAN=20 style=3D"COLOR: #800000">"</SPAN><SPAN=20 style=3D"COLOR: #000000">;<BR> = </SPAN><SPAN style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: #000000">._schImage.Attributes[</SPAN><SPAN=20 style=3D"COLOR: #800000">"</SPAN><SPAN style=3D"COLOR: = #800000">align</SPAN><SPAN=20 style=3D"COLOR: #800000">"</SPAN><SPAN style=3D"COLOR: #000000">] = </SPAN><SPAN=20 style=3D"COLOR: #000000">=3D</SPAN><SPAN style=3D"COLOR: #000000">= </SPAN><SPAN=20 style=3D"COLOR: #800000">"</SPAN><SPAN=20 style=3D"COLOR: #800000">absmiddle</SPAN><SPAN=20 style=3D"COLOR: #800000">"</SPAN><SPAN=20 style=3D"COLOR: = #000000">;<BR><BR> =20 </SPAN><SPAN style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: #000000">._schImage.Attributes[</SPAN><SPAN=20 style=3D"COLOR: #800000">"</SPAN><SPAN style=3D"COLOR: = #800000">onclick</SPAN><SPAN=20 style=3D"COLOR: #800000">"</SPAN><SPAN style=3D"COLOR: #000000">] = </SPAN><SPAN=20 style=3D"COLOR: #000000">=3D</SPAN><SPAN style=3D"COLOR: #000000">=20 String.Format(</SPAN><SPAN style=3D"COLOR: #800000">"</SPAN><SPAN=20 style=3D"COLOR: #800000">__OpenDialog('{0}', null, {1}, {2}, '{3}', = '{4}',=20 {5});</SPAN><SPAN style=3D"COLOR: #800000">"</SPAN><SPAN=20 style=3D"COLOR: #000000">,<BR> = Page.ResolveUrl(</SPAN><SPAN style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: #000000">.DialogPagePath), </SPAN><SPAN=20 style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: #000000">.DialogWidth.ToString(), </SPAN><SPAN=20 style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: #000000">.DialogHeight.ToString(), </SPAN><SPAN=20 style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: #000000">._textBox.ClientID, </SPAN><SPAN=20 style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: #000000">._hiddenBox.ClientID, (</SPAN><SPAN=20 style=3D"COLOR: #0000ff">this</SPAN><SPAN style=3D"COLOR: = #000000">.DialogMode=20 </SPAN><SPAN style=3D"COLOR: #000000">=3D=3D</SPAN><SPAN style=3D"COLOR: = #000000">=20 DialogMode.Model) </SPAN><SPAN style=3D"COLOR: #000000">?</SPAN><SPAN=20 style=3D"COLOR: #000000"></SPAN><SPAN style=3D"COLOR: = #800000">"</SPAN><SPAN=20 style=3D"COLOR: #800000">true</SPAN><SPAN style=3D"COLOR: = #800000">"</SPAN><SPAN=20 style=3D"COLOR: #000000">: </SPAN><SPAN style=3D"COLOR: = #800000">"</SPAN><SPAN=20 style=3D"COLOR: #800000">false</SPAN><SPAN style=3D"COLOR: = #800000">"</SPAN><SPAN=20 style=3D"COLOR: = #000000">);<BR><BR> =20 </SPAN><SPAN style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: #000000">.Controls.Add(_schImage);<BR> = }<BR><BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">protected</SPAN><SPAN style=3D"COLOR: #000000">= </SPAN><SPAN style=3D"COLOR: #0000ff">override</SPAN><SPAN = style=3D"COLOR: #000000">=20 </SPAN><SPAN style=3D"COLOR: #0000ff">void</SPAN><SPAN style=3D"COLOR: = #000000">=20 OnPreRender(EventArgs e)<BR> =20 {<BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">base</SPAN><SPAN=20 style=3D"COLOR: = #000000">.OnPreRender(e);<BR> =20 </SPAN><SPAN style=3D"COLOR: #0000ff">this</SPAN><SPAN=20 style=3D"COLOR: = #000000">.Page.ClientScript.RegisterClientScriptResource(</SPAN><SPAN=20 style=3D"COLOR: #0000ff">this</SPAN><SPAN style=3D"COLOR: = #000000">.GetType(),=20 </SPAN><SPAN style=3D"COLOR: #800000">"</SPAN><SPAN=20 style=3D"COLOR: #800000">OpenDialog.js</SPAN><SPAN=20 style=3D"COLOR: #800000">"</SPAN><SPAN=20 style=3D"COLOR: #000000">);<BR> = }<BR><BR> =20 </SPAN><SPAN style=3D"COLOR: #0000ff">public</SPAN><SPAN style=3D"COLOR: = #000000">=20 </SPAN><SPAN style=3D"COLOR: #0000ff">override</SPAN><SPAN = style=3D"COLOR: #000000">=20 ControlCollection Controls<BR> =20 {<BR> </SPAN><SPAN=20 style=3D"COLOR: #0000ff">get</SPAN><SPAN=20 style=3D"COLOR: #000000"><BR> =20 {<BR> =20 EnsureChildControls();<BR>  = ; =20 </SPAN><SPAN style=3D"COLOR: #0000ff">return</SPAN><SPAN style=3D"COLOR: = #000000">=20 </SPAN><SPAN style=3D"COLOR: #0000ff">base</SPAN><SPAN=20 style=3D"COLOR: = #000000">.Controls;<BR> =20 }<BR> }<BR>}<BR></SPAN></DIV></SPAN> <DIV><SPAN=20 style=3D"COLOR: = #000000"> </DIV></SPAN></DIV></BODY></HTML></FONT></FONT> ------=_NextPart_000_003D_01C83334.07BF4270-- - |
