Board index » Web Programming » getvalue from user control
|
Rmorris
|
|
Rmorris
|
getvalue from user control
Web Programming135
I have placed a input box on a user control and add the user control several times to my aspx pages. How do I retrieve the value of the individual implementations of the user control? Whould I use reflection (and how) ? or reference the id of the rendered input box directly i.e. "pOf_P_picker", "pOr_P_picker"? - |
| NoSpamMgbworld
Registered User |
Mon Oct 10 11:16:03 CDT 2005
Re:getvalue from user control
If you just slap the control on the page numerous times, you can use the
declared name of the control on your page. By default: nameOfControl1 nameOfControl2 nameOfControl3 If you are programatically adding the user control, it is the name you assigned to the control, provided you don't repaint over the control before pulling values from it. -- Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA *************************** Think Outside the Box! *************************** "wapsiii" wrote: QuoteI have placed a input box on a user control and add the user control |
| Trevor
Registered User |
Mon Oct 10 11:40:29 CDT 2005
Re:getvalue from user control
The Texbox within the UserControl is defined as Protected. Hence you would
have to expose it through a public Property which returns the Text Property of the textbox Control or you could change the declaration of the Textbox within the UserControl to be Public. I would rather go for the 1st method. HTH Trevor Benedict R MCSD "wapsiii" <wapsiii@otmail.com>wrote in message QuoteI have placed a input box on a user control and add the user control - |
| wapsiii
Registered User |
Tue Oct 11 08:43:30 CDT 2005
Re:getvalue from user controlI'm using: strLocalVar = CType(Me.pOf.FindControl("picker"), ComponentArt.Web.UI.Calendar).SelectedDate On Mon, 10 Oct 2005 09:40:29 -0700, "Trevor Benedict R" <trevornews@yahoo.com>wrote: QuoteThe Texbox within the UserControl is defined as Protected. Hence you would |
