Clear Form

Last post 02-09-2008 3:52 PM by jamesqua. 4 replies.

Sort Posts:

  • Clear Form

    02-02-2008, 4:04 PM

    Hello, I have a page where users enter some details and press the add button this adds the information to the database. However once the add had happened the fields are still filled with the previous information is there away of clearing the textboxes and setting the dropdownlists to there default value.

    Thanks Mike

  • Re: Clear Form

    02-02-2008, 4:24 PM
    Answer
    • Star
      7,879 point Star
    • jamesqua
    • Member since 08-03-2004, 2:55 PM
    • Columbus, OH
    • Posts 1,362

    Disable viewstate at the page level.

    <%@ Page EnableViewState=”false” %>

    Josh Harrison
    Community Coder
  • Re: Clear Form

    02-02-2008, 4:27 PM

    Thanks a lot.

  • Re: Clear Form

    02-02-2008, 4:56 PM

    Just found a problem with this i have a calendar on the page and with this it does not recognise clicking the date on the calendar when i take it off it does.

  • Re: Clear Form

    02-09-2008, 3:52 PM
    • Star
      7,879 point Star
    • jamesqua
    • Member since 08-03-2004, 2:55 PM
    • Columbus, OH
    • Posts 1,362

    You can enable the viewstate for that specific control.  Just set the EnableViewState property for the calendar control equal to true.

    Josh Harrison
    Community Coder
Page 1 of 1 (5 items)