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

Forum statistics

Threads
473,794
Messages
2,569,641
Members
45,355
Latest member
SJLChristi

Latest Threads

Top