Aleks
asked on
pass url parameter as session
I currently have a link from a web page
<script language="javascript">
window.location.href="qnr_ 08_session .asp?Parti escontid=< %=LASTINSE RTEDID%>";
</script>
then I send to a page that creates a session variable and redirect to another page.
<%
Session("temppartyid") = Request.QueryString("Parti escontid")
%>
Is there a way to skip this middle page and pass the URL variable as the session variable or create it on the fly ?
Also, when moving the mouse over the link it shows the URL and the parameter, if this can be hidden that would be even better, if not at least see if its possible to skip the second page. and pass the session directly from the first link into the third page.
<script language="javascript">
window.location.href="qnr_
</script>
then I send to a page that creates a session variable and redirect to another page.
<%
Session("temppartyid") = Request.QueryString("Parti
%>
Is there a way to skip this middle page and pass the URL variable as the session variable or create it on the fly ?
Also, when moving the mouse over the link it shows the URL and the parameter, if this can be hidden that would be even better, if not at least see if its possible to skip the second page. and pass the session directly from the first link into the third page.
If there is no other processing going on in that middle page, then just redirect to the third page and access the value by doing Request.QueryString("Parti escontid")
ASKER
Because client asked me not to show the URL parameter on the page, if I use a session it won't show. Otherwise they can change it and end up seeing a different record
Then wherever you set LASTINSERTEDID, at the Session variable. Then there's no need to put it in the QueryString
ASKER
I have the same situation in a repeated region, with a link like this:
It passes the URL to page 2 which creates the session then redirects to page 3. If there is no workaround then thats what it is, just trying to find a way to skip that page
<a href="qnr_08_session.asp?Partiescontid=<%=(rs_parties.Fields.Item("userid").Value)%>" class="btn btn-white tooltip-demo"><i class="fa fa-folder" data-toggle="tooltip" data-placement="top" title="Edit family member"></i></a>
It passes the URL to page 2 which creates the session then redirects to page 3. If there is no workaround then thats what it is, just trying to find a way to skip that page
Do you want the values all in one session variable or separate session variables?
ASKER
In this case its just one parameter, so one session will do.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks. I will give this a try later today
ASKER
Ill assign the points now. Will implement later this week.