Forums

This topic is locked

Redirect wrong after update

Posted 19 Mar 2002 14:59:43
1
has voted
19 Mar 2002 14:59:43 Joost van Dun posted:
I've made 2 pages.
One is a page that displays users in the database.
The second page is an update page with the user information.

In the first page (userlist) you go to the updatepage to change his information. This is done by using a URL Parameter. Something like <pre id=code><font face=courier size=2 id=code>users_list.asp?UserID=493</font id=code></pre id=code>

When i've changed the information, i hit the Save button and my list is displayed again. But the URL Parameter is still in the HTTP Address. So if I want to change another user, the URL parameter is displayed double..and the page can't be opened (users_update.asp?UserID=493&UserID=493)

Should I use a form parameter instead of URL?
Or can I put some code in the page..to clear the URL parameter?

Thanx already..

Edited by - JVD Design on 19 Mar 2002 15:00:30

Replies

Replied 21 Mar 2002 23:00:25
21 Mar 2002 23:00:25 Myra LaVoie replied:
<font face='Century Gothic'></font id='Century Gothic'><font size=2></font id=size2>I am having the same problem. Except I do not get the appended query string more than once. I have had a major prob with this update behavior!

Thanks

Replied 21 Mar 2002 23:00:39
21 Mar 2002 23:00:39 Myra LaVoie replied:
<font face='Century Gothic'></font id='Century Gothic'><font size=2></font id=size2>I am having the same problem. Except I do not get the appended query string more than once. I have had a major prob with this update behavior!

Thanks

Replied 20 Nov 2002 22:42:24
20 Nov 2002 22:42:24 Ken Bromberger replied:
This is apparently by design. The parameters are passed for use on the next page when using Insert, Update or Delete behaviors so the record can be accessed again.. Like an Insert confirmation page or something..

If you find this code on the page:
<pre id=code><font face=courier size=2 id=code>' append the query string to the redirect URL
If (MM_editRedirectUrl &lt;&gt; "" And Request.QueryString &lt;&gt; "" Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString &lt;&gt; "" Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If </font id=code></pre id=code>

And remove the code appending the query string to the URL, it will of course not have the URL parameters on the next page.

Reply to this topic