Set Page properties in custom control

N

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.


Thanks
 
P

Peter Bucher [MVP]

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>;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,056
Messages
2,570,439
Members
47,101
Latest member
DoloresHol

Latest Threads

Top