locked
Issue with submitting a form when using Tab Containers RRS feed

  • Question

  • User-331904504 posted

    Hi all

    Is it possible to use a TAB Container to submit a form?  The problem I am now faced with is.

    I have created an online form with 3 separate tabs.  Each consisting of a number of controls e.g. txtBox & DDL's

    When I've created the 'submit' button with it's corresponding insert data source this is when it falls over by not recognising the controls on the other tabs

    I comment out the tab container and it works just fine.

    What can I do, please help?

     

      

     

     

    Friday, July 4, 2014 3:35 AM

Answers

  • User-1360095595 posted

    That's right.

    As a quick test, can you use that ugly looking ID, ctl00$ContentPlaceHolder1$tabContainer$personalDetails$txtNINO, in the controlparameter.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 4, 2014 4:40 AM

All replies

  • User-1360095595 posted

    TabContainer/TabPanel are rendered as div/span so they shouldn't affect your ability to access controls in code behind. You are referring to the AJAX Control Toolkit TabContainer, right?

    Friday, July 4, 2014 3:46 AM
  • User-331904504 posted

    I am referring to AJAX Control Toolkit Tab Container, yes

    I've set up both the Tab Container and 3 associated Tab Panels, correctly.  This works and pulls in the required data on the DDL's and validation etc.

    However when I select the 'submit' button I get the following error:

    Could not find control 'txtNINO' in ControlParameter 'NINumber'.

    However this DOES (if I remove the tab container/panel the form inserts the record as required) exist but I have the DataSource sat in the 3rd tab where the 'submit' button is located.

     

    Friday, July 4, 2014 3:56 AM
  • User-1360095595 posted

    I see. Can you post your relevant HTML markup?

    Friday, July 4, 2014 4:00 AM
  • User-331904504 posted

    I've removed all validation and animationExtenders, so that's why there's a lot of empty <TD> just to try and reduce the size of the script

     

    Friday, July 4, 2014 4:18 AM
  • User-1360095595 posted

    Can you look at the rendered page's source, and search for the "txtNINO" input control; what is the full ID?

    Friday, July 4, 2014 4:35 AM
  • User-331904504 posted

    Do you mean this:

     <input name="ctl00$ContentPlaceHolder1$tabContainer$personalDetails$txtNINO" type="text" maxlength="9" id="ctl00_ContentPlaceHolder1_tabContainer_personalDetails_txtNINO" tabindex="1" onkeypress="return event.keyCode != 13;" style="background-color:Moccasin;" />
    

    Otherwise I'm not 100% certain what you're referring too?

    Friday, July 4, 2014 4:38 AM
  • User-1360095595 posted

    That's right.

    As a quick test, can you use that ugly looking ID, ctl00$ContentPlaceHolder1$tabContainer$personalDetails$txtNINO, in the controlparameter.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 4, 2014 4:40 AM
  • User-331904504 posted

    The error has moved down to the next control, so can you please give me 10 mins for me to replace the other controls and I'll get back to you (fingers crossed)

    You really are good   

     

    Friday, July 4, 2014 4:59 AM
  • User-331904504 posted

    Thanks Metal, you're a diamond.  If I could buy you a drink I would

    cheers

    Friday, July 4, 2014 5:19 AM