Retrieve value from textbox in webusercontrol

Discussion in 'ASP .Net Web Controls' started by Kevin Attard, Nov 6, 2006.

  1. Kevin Attard

    Kevin Attard Guest

    I have this form being generated dynamically.
    The whole form generator is a usercontrol in itself.
    Some fields are displayed using regular controls eg: Textbox and others use
    webusercontrols

    This is the basic cycle:
    1. Create controls
    2. load data in controls from db (if exist)

    When the save button is pressed a post back occurs and :
    1. controls are created
    2. data is set in controls from db
    3. data is retrieved from the controls and saving occurs

    Here is the problem
    I have 2 textboxes, one normal and the other in a usercontrol and both have
    '1' set as text. If I change the text to '2' and press save, the normal
    textbox saves 2 while the textbox in the usercontrol saves 1 in the db.

    What am I doing wrong? is it the cycle or because of the usercontrol?
     
    Kevin Attard, Nov 6, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Dalberg
    Replies:
    1
    Views:
    3,213
  2. VB Programmer

    How loop datalist to retrieve textbox value?

    VB Programmer, Nov 14, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    9,434
    VB Programmer
    Nov 16, 2005
  3. Kevin Attard

    Problem in getting WebUserControl value

    Kevin Attard, Nov 6, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    298
    Kevin Attard
    Nov 6, 2006
  4. John Dalberg

    Unable to retrieve textbox value from datagrid

    John Dalberg, Aug 13, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    219
    John Dalberg
    Aug 13, 2004
  5. Bryan

    Retrieve Textbox Value From Datagrid

    Bryan, Oct 3, 2004, in forum: Javascript
    Replies:
    1
    Views:
    130
    Martin Honnen
    Oct 3, 2004
Loading...

Share This Page