-
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!
-
By running through all the fields right after database insertion and setting their textvalues to "".
-
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.
-
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