|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
pass value from User Control to a .aspx page
I created a user control with a DataGrid in it, the user control is included in a .aspx page, how can I pass values from the DataGrid of teh UserControl to a TextBox in the form that contains it?? for example, to click on the DataGrid and that the TextBox recive the info... Thanks!
|
|
#2
|
|||
|
|||
|
Setup a property in your user control that will expose the value you want the textbox to grab like so:
In your user control code behind Code:
Public ReadOnly Property GetValue() as String
Return myDatagrid.someValue
End Property
In your aspx page: Code:
myTextBox.Text = ucInstance.GetValue there ya go!
__________________
"Mankind cannot define memory, yet it defines mankind" |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > .Net Development > pass value from User Control to a .aspx page |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|