Wednesday, March 21, 2007

WebControl on a Page/UserControl

WebControl on a Page

  • Directly access the control using the ID
  • WebControl value(.text) is persisted and can be accessed in the page load event of the usercontrol textbox

WebControl on a UserControl

  • Cannot directly access the webcontrol using its ID
  • Need to use the dynamic generated id of the control : Usercontrolid + textboxid
  • In javascript, use the the clientid of the control to get the value of the webcontrol(directly using the textbox1.text would be show null value)

No comments:

Post a Comment