testn1
asked on
response.redirect
why when i response.redirect to one page it would hang/sit on the same browser page.... and why it would work if i redirect to other pages?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
page load()
ASKER
but.. it doesn't work on any page... is there any way to trace what page called another? (after you're in the page)
public void Application_OnPostRequestH andlerExec ute(Object sender, EventArgs e)
{
ReferralLogger rlLogger;
if (String.Empty != Request.QueryString.ToStri ng())
// We have query parameters so we need to log those as well
// as the current page name
rlLogger = new ReferralLogger(Request.Pat h.ToString ()+"?"
Request.QueryString.ToStri ng(),
Request.UrlReferrer);
else
// No query string, so simply log the request and the referring URL
rlLogger = new ReferralLogger(Request.Pat h.ToString (),
Request.UrlReferrer);
}
{
ReferralLogger rlLogger;
if (String.Empty != Request.QueryString.ToStri
// We have query parameters so we need to log those as well
// as the current page name
rlLogger = new ReferralLogger(Request.Pat
Request.QueryString.ToStri
Request.UrlReferrer);
else
// No query string, so simply log the request and the referring URL
rlLogger = new ReferralLogger(Request.Pat
Request.UrlReferrer);
}
or in vb:
If Not Request.UrlReferrer Is Nothing Then
Response.Write("<TR><TD>Re ferer</td> <td>" & Request.UrlReferrer.ToStri ng() & "</td></tr><pre>")
Else
Response.Write("<TR><TD>Re ferer</td> <td>blind (no referer)</td></tr><pre>")
End If
If Not Request.UrlReferrer Is Nothing Then
Response.Write("<TR><TD>Re
Else
Response.Write("<TR><TD>Re
End If
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
still nothing... what i've discovered is.. that everytime i do a HttpContext.Current.Reques t.Cookies. Item("test 1").Item(" ID") i loose all the other items/values of my cookie, is this the normal .net behavior?
are you making it persistant?
Protected Sub Submit_Click(sender As Object, e As EventArgs)
Dim cookie As New HttpCookie("preferences2")
cookie.Values.Add("ForeCol or",ForeCo lor.Value)
...
cookie.Expires = DateTime.MaxValue ' Never Expires
Response.AppendCookie(cook ie)
Response.Redirect(State("R eferer").T oString())
End Sub
Regards,
Aeros
Protected Sub Submit_Click(sender As Object, e As EventArgs)
Dim cookie As New HttpCookie("preferences2")
cookie.Values.Add("ForeCol
...
cookie.Expires = DateTime.MaxValue ' Never Expires
Response.AppendCookie(cook
Response.Redirect(State("R
End Sub
Regards,
Aeros
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
==
no, i'm not redirecting to my same page ...
right now .. i'm testing:
page1.aspx -- response.redirect("test1.a
on test1.aspx code behind i have -- response.redirect("welcome
same happens if I redirect directly from page1.aspx .. it just hangs.. still showing page1.aspx on the browser.