asp.net registration form development

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

    asp.net registration form development

    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.
    Last edited by bwan050; Feb 17 '08, 10:26 AM. Reason: thaks
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    This is a postback issue try using not page.ispostback . If you are using 2.0 try using membership. HTH.

    Comment

    • Shawpnendu Bikash Maloroy
      New Member
      • Feb 2008
      • 3

      #3
      Originally posted by kenobewan
      This is a postback issue try using not page.ispostback . If you are using 2.0 try using membership. HTH.
      I think you populated combobox in page load event. When you click on a button the page execute your page load event again then execute click event.

      So you block the page load event code by

      if (!IsPostBack)
      {

      //your page load code goes here
      }

      Hope it will solve your problem.

      Comment

      • bwan050
        New Member
        • Feb 2008
        • 4

        #4
        Originally posted by Shawpnendu Bikash Maloroy
        I think you populated combobox in page load event. When you click on a button the page execute your page load event again then execute click event.

        So you block the page load event code by

        if (!IsPostBack)
        {

        //your page load code goes here
        }

        Hope it will solve your problem.
        Thanks for your post.
        The combo box is not populated in the page load event.
        I used class asp way to fill out the combo box..
        <option><% some thing %></option>

        Comment

        Working...