Re: Set Page properties in custom control



Hi NKaufman

I have a custom control that creates some labels, textboxes and
buttons. In the PreRender() I am trying to set up something similar
to
the following;

form.defaultbutton = Button1
form.defaultfocus = TextBox1


It does not work. Any pointers would be appreciated.
Use the PreRender Event in the CustomControl.

protected overrides OnPreRender(object sender, EventArgs e) {
this.Page.Form.<XXXX> = <XX>;
}

--
Gruss, Peter Bucher
Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerland
http://www.aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community
http://www.aspnetzone.de/blogs/peterbucher/ - Auf den Spuren von .NET
.


Loading