Results 1 to 4 of 4

Thread: submit problem....

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    submit problem....

    hi there. using asp.net and vb.net

    im basically trying to make a "slight" alternative when this happens:

    user fills in field details, when they hit submit, all that data is put into SQL and it goes back to the page where they selected the item they wish to add to the DB


    now - how can i make it so that when they hit the submit button, it still puts data in SQL BUT instead of going back to the "selection" page, it stays on the same page, clearing out the fields and ready for a new entry of data?

    Thanks!

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    By running through all the fields right after database insertion and setting their textvalues to "".

  3. #3
    Hyperactive Member Kirun's Avatar
    Join Date
    Oct 2001
    Location
    Karachi , Pakistan
    Posts
    333

    Exclamation

    what you can do is :

    you can add an argument in form tab which would be like this,suppose your this page name is Mypage.asp


    Code:
    <form name= form1 action = post action=mypage.asp?myaction="save">

    and then in your Mypage.asp page retrive the querystring and make the entry in database and redirect the page to it self.

  4. #4
    Hyperactive Member greg_quinn's Avatar
    Join Date
    Nov 2002
    Location
    South Africa
    Posts
    366
    There are simpler ways...

    --- form.aspx -----

    Sub DoFormSubmission(Sender as Object, E as EventArgs)
    ' Insert stuff into database here..

    ' Redirect to form with cleared values, the easy way!
    Response.Redirect("form.aspx")
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width