If you wish to go this route, set default in the user control or expose the
user control up the stack so you can set the value. To expose up the stack,
set the button to protected instead of private, so you can see it at page
level. This is the proper OO method of setting up user controls (which most
examples DO NOT do).
NOTE: To pass back values properly, unless all work is done in the control,
you will have to raise an event (delegate) and handle on the page level. The
best way to do this is make the user control a complete object with
properties for the different controls.
NOTE (also): If you are using this particular piece on more than one form,
compiling into a server control is often the best option.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
********************************************
Think outside the box!
********************************************
"AlecL" <sa********@hotmail.comwrote in message
news:11********************@a34g2000cwb.googlegrou ps.com...
Hi All,
I have added a user control onto an aspx page and want to make the
submit button of that user control the default button when the panel
in which the user control is located is visible. I have used the
code:
Page.RegisterHiddenField("__EVENTTARGET", "Login.btnSubmit")
in the Page Load event but this does not make the submit button
default(enter) button. Any ideas on how can I do this. I have also
tried using just the name of the button instead of Login.btnSubmit
which is the nameofcontrol.nameofbutton convention but to no avail.
HELP! Please.
Al