Registration form post back

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bwan050
    New Member
    • Feb 2008
    • 4

    Registration form post back

    I am new to asp.net.
    Currently I am developing a registration form.
    it contains user name, email, password textboxes.
    and several drop down lists, such as date, month and country.

    Once user fill out the form and click on the submit button.
    The program firstly check whether the email or user name exists in the database.

    If exists, then
    from is not submitted
    re-enter user name.

    the problem is that the selected values in drop down lists all go back to initial values. i.e go back to the first option. after submitted.

    Can anybody please tell me how to make the drop down lists values remains the same if page is submitted but was not successful.

    Thanks in advance
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    One possibility to avoid this problem is to use Ajax (to prevent the page being unloaded/refreshed).

    Another solution is to use the submitted values to reset the drop down elements, text boxes, etc.

    Comment

    • bwan050
      New Member
      • Feb 2008
      • 4

      #3
      Thanks for your reply mate..
      Can you please post some ajax working code? if you have them available.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Here's an example. Also check out some of the links in the Off-site Links thread at the top of this forum. If you get stuck, post back here with your questions.

        Comment

        Working...