Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
275
sqldatasource control can't see text boxes
posted

Hello

I have a webpanel on a page with several text boxes. i call the SQLdatasource control to do a INSERT and get the exception that it cannot find the textboxs for the fields. i placed them oot of the panel and the insert works fine. is there something i am missing?

 this also happens with the group box

please help as i just finished the page layout and it looks great but not working....

TIA

 

Parents
  • 19308
    Verified Answer
    posted

    Since the textboxes are in a container control's template, the SQL DataSource will need their fully qualified ID in order to find them.  You'll want to get the UniqueID of the TextBox and use that as the controlID parameter value.  The easiest way to get the UniqueID is to start debugging and check the UniqueID property of the textbox when the page is loaded.  It should be something like webpanel1_ctl0_textbox1

    Hope this helps,

    -Tony

Reply Children