Stan said:
I have a page with several textboxes..
In the same page, I set a user control with a button.
I would like to know how to catch the different values from the textboxes
when I click on the button.
Are you wanting to read the TextBox values from the User Control? This
you shouldn't do, as the user control should be ignorant about the page
that contains it.
If you want the ASP.NET Web page to do some processing when the User
Control's button is clicked, the best way, IMO, is to have the user
control raise an event when its button is clicked. The page, then, can
have an event handler for this event.
I discuss this approach and provide a C# code example in the article:
An Extensive Examination of User Controls
http://msdn.microsoft.com/asp.net/u...l=/library/en-us/dnaspp/html/usercontrols.asp
Happy Programming!
--
Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com
* When you think ASP, think 4GuysFromRolla.com!