PDA

Click to See Complete Forum and Search --> : submit problem....


Techno
Oct 31st, 2004, 06:32 PM
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!

mendhak
Oct 31st, 2004, 10:48 PM
By running through all the fields right after database insertion and setting their textvalues to "".

Kirun
Oct 31st, 2004, 10:49 PM
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


<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.

greg_quinn
Nov 11th, 2004, 07:34 AM
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