If not page.ispostback
session, viewstate, or cookie it
Else
Pull your page
End if
Regards,
Dave
-----Original Message-----
From: aaron [mailto:agflem@y...]
Sent: Thursday, September 05, 2002 7:33 AM
To: ASPX_Professional
Subject: [aspx_professional] RE: Capturing HTTP_Referer
Any suggestions on how to get arround that?
-----Original Message-----
From: Sampath, Ramanujam (Cognizant) [mailto:SRamanuj@c...]
Sent: Thursday, September 05, 2002 2:36 AM
To: ASPX_Professional
Subject: [aspx_professional] RE: Capturing HTTP_Referer
well aaron....
See the code is in a server controls button click. So it posts back to
the same page even after it goes to the server.... so the
Request.ServerVariables("HTTP_REFERER") reffers to the same page..unless
u move to the next page explictly.
keep me posted if u still have doubt....
==============================
S.Ramanujam
Programmer Analyst
Cognizant technology Solutions (p) Ltd. - CTS
38 & 39 Whites Road,
WCB - Whites Road Circular Building
Royapettah, Chennai - 600014
Ph : +xx xx xxx xxxx Extn 5113 [Off]
: +xx xx xxx xxxx [Res]
-----Original Message-----
From: aaron [mailto:agflem@y...]
Sent: Wednesday, September 04, 2002 7:42 PM
To: ASPX_Professional
Subject: [aspx_professional] Capturing HTTP_Referer
I have the following on a feedback page...
<script language="vb" runat="server">
Sub btnSendFeedback_Click(sender as Object, e as EventArgs)
dim strRefer
strRefer = Request.ServerVariables("HTTP_REFERER")
Dim mail as New MailMessage()
mail.To = "me@m..."
mail.From = txtEmail.Text
mail.BodyFormat = MailFormat.Text
mail.Priority = MailPriority.Normal
mail.Subject = "Message"
mail.Body = "At " + DateTime.Now + " an email was sent from the
homepage " & chr(13) & _
"from " & txtEmail.Text & vbCrLf & chr(13) & _
"Referring address - " & strRefer
SmtpMail.SmtpServer = "mysmtp"
SmtpMail.Send(mail)
panelSendEmail.Visible = false
panelMailSent.Visible = true
End Sub
</script>
Which works just fine except that strRefer is always the same -
http://mydomain/form.aspx I've tried clicking through from different
pages and when the mail is sent it still displays strRefer as the page
itself.
Any thoughts?
Thanks!!
---
ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=1861007442
ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=1861007450
These books are a complete reference to the ASP.NET namespaces
for developers who are already familiar with using ASP.NET.
There is no trivial introductory material or useless .NET
hype and the presentation of the namespaces, in an easy-to use
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes,
giving you those real-world tips that the documentation doesn't
offer, and demonstrating complex techniques with simple
examples.
---
---
ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=1861007442
ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=1861007450
These books are a complete reference to the ASP.NET namespaces
for developers who are already familiar with using ASP.NET.
There is no trivial introductory material or useless .NET
hype and the presentation of the namespaces, in an easy-to use
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes,
giving you those real-world tips that the documentation doesn't
offer, and demonstrating complex techniques with simple
examples.
---
---
ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=1861007442
ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=1861007450
These books are a complete reference to the ASP.NET namespaces
for developers who are already familiar with using ASP.NET.
There is no trivial introductory material or useless .NET
hype and the presentation of the namespaces, in an easy-to use
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes,
giving you those real-world tips that the documentation doesn't
offer, and demonstrating complex techniques with simple
examples.
---