No re-submitting of form

Results 1 to 7 of 7

Thread: No re-submitting of form

  1. #1
    pari Guest

    Default No re-submitting of form

    how do i PREVENT the form be resubmitted by refreshing the asp page??<BR>thnx in advance<BR>pari

  2. #2
    Franco Guest

    Default RE: No re-submitting of form

    Pari<BR>If the form contained a control (say an input box named txtUser) then you can test to see if txtUser exists, i.e.<BR><BR>&#060;%<BR>If Request.Form("txtUser") = "" Then<BR>&#039Either the form was submitted with the textbox empty or the form has never been submitted. In this case, show the form again.<BR><BR>Response.Write "&#060;FORM&#062;"<BR>Response.Write "&#060;INPUT name=txtUser type=text&#062;"<BR>Response.Write "&#060;/FORM&#062;"<BR><BR>Else<BR>&#039Something has been submitted via txtUser.<BR>Response.Write "Welcome " & Request.Form("txtUser")<BR>End If<BR><BR>hth<BR><BR>Franco<BR><BR><BR><BR>

  3. #3
    pari Guest

    Default no it dsnt work

    hi franco that<BR>thing dosnt work coz we dont have submit button on the asp page.<BR>it takes the previous values.<BR>it works if i use session variable but i dont want to use sessions.<BR>pari<BR><BR>

  4. #4
    ramakrishna reddy Guest

    Default RE: No re-submitting of form

    &#060;% <BR> txtuser1=request("txtuser") <BR> if txtuser1= " " then<BR> response.redirect("Asp file name")<BR>else<BR> form.submit<BR>%&#062;<BR>Try this one it will work

  5. #5
    Join Date
    Dec 1969

    Default RE: no it dsnt work

    A possible solution is to have all your processing/database entry etc in a seperate file (called by the form) which once finished processing redirects to an asp page that displays the data. Might not work though depends on your code and what you are trying to achieve. If you don&#039t want to use session vars then you could get the processing ASP to send any data to the display page in the Query String.<BR><BR>Doing it this way should prevent the data being reprocessed, if the user hits reload then the display page will be refreshed and not the processing page.<BR><BR>Hope that helps<BR><BR>Pete

  6. #6
    pari Guest

    Default puhleaze !!how can form.submit work with vbscript?

    no sir, that doesnt work<BR>

  7. #7
    rajit Guest

    Default just a thought.....

    just a thought.....<BR><BR>I think when you hit refresh button, the page goes through application_start (or may be session_start) event in your global.asa file. Perpahs you could accomplish your code structure within this event to bypass your regular code with raising some flag....<BR><BR>

Posting Permissions

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