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.EventArg s) Handles
btnemail.Click
Dim inttrx As Integer
inttrx = CType(lblmaxtrx id.Text, Integer)
SqlUpdateComman d5.Parameters(" @ec").Value =
txtEC.Text
SqlUpdateComman d5.Parameters(" @tid").Value =
inttrx
SqlConnection1. Open()
SqlUpdateComman d5.ExecuteNonQu ery()
SqlConnection1. Close()
If txtEC.Text > 2500 Then
Response.Redire ct
("https://virtualog/GPC/bvdform.asp?trx id=" &
(lblmaxtrxid.Te xt) & "&sendto=" & txtemail.Text & "&pch"
& CType(lblpch.Te xt, Integer) & "&uid=" & lbluserid.Text
& "")
Else
Userid = Request.QuerySt ring("uid")
Response.Redire ct
("https://Virtualog/GPC/emailrequest.as p?trxid=" &
(lblmaxtrxid.Te xt) & "&sendto=" & txtemail.Text & "&pch"
& CType(lblpch.Te xt, 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.QuerySt ring("trxid")
sendname = request.QuerySt ring("sendto")
sendto = sendname + "@charleston.af .mil"
'response.Write (sendto)
Userid = Request.QuerySt ring("uid")
'userid = 110
'response.Write (userid)
permitpch = request.QuerySt ring("pch")
'permitpch = 13
'response.Write (permitpch)
username = request.QuerySt ring("uid")
response.Write( request.QuerySt ring("uid"))
response.Write( "userid= "& uid&"<br>")
Set mail = Server.createob ject("Persits.M ailSender")
mail.host = "131.9.25.1 44"
Mail.port=25
Mail.From = "Virtualog@char leston.af.mil"
Mail.FromName = "Moneta GPC Request Submission"
Mail.AddAddress sendto
'Mail.AddAddres s "amy.powell@cha rleston.af.mil"
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.QueryS tring("uid")%>& pch=<%=request. QueryString
("pch")%>">Retu rn to Moneta</a><br><br><br>
<a href="https://virtualog/gpc/gpctrx.aspx?uid =<%
=request.QueryS tring("uid")%>& pch=<%=request. QueryString
("pch")%>">Retu rn 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.EventArg s) Handles
btnemail.Click
Dim inttrx As Integer
inttrx = CType(lblmaxtrx id.Text, Integer)
SqlUpdateComman d5.Parameters(" @ec").Value =
txtEC.Text
SqlUpdateComman d5.Parameters(" @tid").Value =
inttrx
SqlConnection1. Open()
SqlUpdateComman d5.ExecuteNonQu ery()
SqlConnection1. Close()
If txtEC.Text > 2500 Then
Response.Redire ct
("https://virtualog/GPC/bvdform.asp?trx id=" &
(lblmaxtrxid.Te xt) & "&sendto=" & txtemail.Text & "&pch"
& CType(lblpch.Te xt, Integer) & "&uid=" & lbluserid.Text
& "")
Else
Userid = Request.QuerySt ring("uid")
Response.Redire ct
("https://Virtualog/GPC/emailrequest.as p?trxid=" &
(lblmaxtrxid.Te xt) & "&sendto=" & txtemail.Text & "&pch"
& CType(lblpch.Te xt, 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.QuerySt ring("trxid")
sendname = request.QuerySt ring("sendto")
sendto = sendname + "@charleston.af .mil"
'response.Write (sendto)
Userid = Request.QuerySt ring("uid")
'userid = 110
'response.Write (userid)
permitpch = request.QuerySt ring("pch")
'permitpch = 13
'response.Write (permitpch)
username = request.QuerySt ring("uid")
response.Write( request.QuerySt ring("uid"))
response.Write( "userid= "& uid&"<br>")
Set mail = Server.createob ject("Persits.M ailSender")
mail.host = "131.9.25.1 44"
Mail.port=25
Mail.From = "Virtualog@char leston.af.mil"
Mail.FromName = "Moneta GPC Request Submission"
Mail.AddAddress sendto
'Mail.AddAddres s "amy.powell@cha rleston.af.mil"
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.QueryS tring("uid")%>& pch=<%=request. QueryString
("pch")%>">Retu rn to Moneta</a><br><br><br>
<a href="https://virtualog/gpc/gpctrx.aspx?uid =<%
=request.QueryS tring("uid")%>& pch=<%=request. QueryString
("pch")%>">Retu rn 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.
Comment