Click here to Skip to main content
16,012,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HTML:
HTML
<a href='jobgrouping.aspx?Job_no=<%# DataBinder.Eval(Container.DataItem,"JOBNO") %>','<%#DataBinder.Eval(Container.DataItem, "TaxiNo")%>',

vb.net code behind:
VB
struserid = Request.Params("user")


here i need to pass the variable struserid to the jobgrouping page how do i do it with ahref ,i dont want to use resonse.write
Posted
Updated 23-Feb-12 23:10pm
v2

you can pass struserid by QueryString itself. Attach struserID in Query string as shown
<a href="/KB/answers/jobgrouping.aspx"?strUserID=XXXXXX&Job_no=<%# DataBinder.Eval(Container.DataItem,"JOBNO") %>','<%#DataBinder.Eval(Container.DataItem, "TaxiNo")%>',


Now on jobgrouping page, this parameter can be extracted by using below JavaScript

<SCRIPT TYPE="text/javascript">
function getStrUserId()
{
var strUserId = Request.QueryString("strUserID");
return strUserId;
}
</SCRIPT>
 
Share this answer
 
Just found an article in code project which helps in passing variables in pages.

Passing variables between pages using QueryString[^]

I think it can help you
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900