A
Amy
I am having a strange problem. I pass data as a
querystring from an aspx page to an asp page to generate
an email. THe data is then used to go back to the
original page and allow access based on previous
permissions. I can access half of my querystrings on the
asp page and display them however two that are vital are
not displaying in the asp page and are not being passed
back in the href as a querystring.
Please any help is appreciated.
Here is the code for both pages - a little sloppy but I
tried so many things.
Private Sub btnemail_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
btnemail.Click
Dim inttrx As Integer
inttrx = CType(lblmaxtrxid.Text, Integer)
SqlUpdateCommand5.Parameters("@ec").Value =
txtEC.Text
SqlUpdateCommand5.Parameters("@tid").Value =
inttrx
SqlConnection1.Open()
SqlUpdateCommand5.ExecuteNonQuery()
SqlConnection1.Close()
If txtEC.Text > 2500 Then
Response.Redirect
("https://virtualog/GPC/bvdform.asp?trxid=" &
(lblmaxtrxid.Text) & "&sendto=" & txtemail.Text & "&pch"
& CType(lblpch.Text, Integer) & "&uid=" & lbluserid.Text
& "")
Else
Userid = Request.QueryString("uid")
Response.Redirect
("https://Virtualog/GPC/emailrequest.asp?trxid=" &
(lblmaxtrxid.Text) & "&sendto=" & txtemail.Text & "&pch"
& CType(lblpch.Text, Integer) & "&uid=" & lbluserid.Text
& "")
End If
End Sub
THe ASP PAGE::
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
<html>
<head>
<title>GPC Request Notification</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<body>
<%
trxid = request.QueryString("trxid")
sendname = request.QueryString("sendto")
sendto = sendname + "@charleston.af.mil"
'response.Write(sendto)
Userid = Request.QueryString("uid")
'userid = 110
'response.Write(userid)
permitpch = request.QueryString("pch")
'permitpch = 13
'response.Write(permitpch)
username = request.QueryString("uid")
response.Write(request.QueryString("uid"))
response.Write("userid= "& uid&"<br>")
Set mail = Server.createobject("Persits.MailSender")
mail.host = "131.9.25.144"
Mail.port=25
Mail.From = "(e-mail address removed)"
Mail.FromName = "Moneta GPC Request Submission"
Mail.AddAddress sendto
'Mail.AddAddress "(e-mail address removed)"
Mail.Subject = " Moneta GPC Request Submission"
MyBody= " A new request ( Transaction # "&trxid&" ) has
been submitted for approval from "&username&"
id= "&uid&". Please go to Moneta to review the GPC
Request."
Mail.Body = MyBody
Mail.IsHTML = True
On error resume Next
Mail.Send
IF Err <> 0 Then
Response.write "An error occurred:" & Err.description
End if
response.Write("Your email notifiction has been sent to
"& sendto &" requesting approval for
transaction # "& trxid&".")%>
<br>
<br>
<a href="Https://virtualog/GPCindex/nindex.asp?uid=<%
=request.QueryString("uid")%>&pch=<%=request.QueryString
("pch")%>">Return to Moneta</a><br><br><br>
<a href="https://virtualog/gpc/gpctrx.aspx?uid=<%
=request.QueryString("uid")%>&pch=<%=request.QueryString
("pch")%>">Return to GPC Transactions</a><br><br><br>
<a href="https://infofusion/og/logout.cfm">End Moneta
session (Log Out)</a><br><br><br>
</body>
</html>
Please help this is driving me crazy.
querystring from an aspx page to an asp page to generate
an email. THe data is then used to go back to the
original page and allow access based on previous
permissions. I can access half of my querystrings on the
asp page and display them however two that are vital are
not displaying in the asp page and are not being passed
back in the href as a querystring.
Please any help is appreciated.
Here is the code for both pages - a little sloppy but I
tried so many things.
Private Sub btnemail_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
btnemail.Click
Dim inttrx As Integer
inttrx = CType(lblmaxtrxid.Text, Integer)
SqlUpdateCommand5.Parameters("@ec").Value =
txtEC.Text
SqlUpdateCommand5.Parameters("@tid").Value =
inttrx
SqlConnection1.Open()
SqlUpdateCommand5.ExecuteNonQuery()
SqlConnection1.Close()
If txtEC.Text > 2500 Then
Response.Redirect
("https://virtualog/GPC/bvdform.asp?trxid=" &
(lblmaxtrxid.Text) & "&sendto=" & txtemail.Text & "&pch"
& CType(lblpch.Text, Integer) & "&uid=" & lbluserid.Text
& "")
Else
Userid = Request.QueryString("uid")
Response.Redirect
("https://Virtualog/GPC/emailrequest.asp?trxid=" &
(lblmaxtrxid.Text) & "&sendto=" & txtemail.Text & "&pch"
& CType(lblpch.Text, Integer) & "&uid=" & lbluserid.Text
& "")
End If
End Sub
THe ASP PAGE::
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
<html>
<head>
<title>GPC Request Notification</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<body>
<%
trxid = request.QueryString("trxid")
sendname = request.QueryString("sendto")
sendto = sendname + "@charleston.af.mil"
'response.Write(sendto)
Userid = Request.QueryString("uid")
'userid = 110
'response.Write(userid)
permitpch = request.QueryString("pch")
'permitpch = 13
'response.Write(permitpch)
username = request.QueryString("uid")
response.Write(request.QueryString("uid"))
response.Write("userid= "& uid&"<br>")
Set mail = Server.createobject("Persits.MailSender")
mail.host = "131.9.25.144"
Mail.port=25
Mail.From = "(e-mail address removed)"
Mail.FromName = "Moneta GPC Request Submission"
Mail.AddAddress sendto
'Mail.AddAddress "(e-mail address removed)"
Mail.Subject = " Moneta GPC Request Submission"
MyBody= " A new request ( Transaction # "&trxid&" ) has
been submitted for approval from "&username&"
id= "&uid&". Please go to Moneta to review the GPC
Request."
Mail.Body = MyBody
Mail.IsHTML = True
On error resume Next
Mail.Send
IF Err <> 0 Then
Response.write "An error occurred:" & Err.description
End if
response.Write("Your email notifiction has been sent to
"& sendto &" requesting approval for
transaction # "& trxid&".")%>
<br>
<br>
<a href="Https://virtualog/GPCindex/nindex.asp?uid=<%
=request.QueryString("uid")%>&pch=<%=request.QueryString
("pch")%>">Return to Moneta</a><br><br><br>
<a href="https://virtualog/gpc/gpctrx.aspx?uid=<%
=request.QueryString("uid")%>&pch=<%=request.QueryString
("pch")%>">Return to GPC Transactions</a><br><br><br>
<a href="https://infofusion/og/logout.cfm">End Moneta
session (Log Out)</a><br><br><br>
</body>
</html>
Please help this is driving me crazy.