CipherIS
asked on
ASP.NET - AHRef - Query String Parameter
I need to add 2 query string parameters. The first is from a value from a dataitem. The second is from a Response.Write. How do you write it?
<a href='gotopage.aspx?ID=<%# DataBinder .Eval(Cont ainer, "dataItem.my_id")%> + '&2ID=<%Response.Write(Vie wState["ID "].ToStrin g());%>' >
<%#DataBinder.Eval(Contain er, "dataItem.t_id")%>
</a>
I am passing in two ID's. One from a database and one from the ViewState from the page.
Thanks.
<a href='gotopage.aspx?ID=<%#
<%#DataBinder.Eval(Contain
</a>
I am passing in two ID's. One from a database and one from the ViewState from the page.
Thanks.
ASKER
I'm receiving the below error:
Line 314: <a href='gotopage.aspx?ID=<%# DataBinder .Eval(Cont ainer, "dataItem.mbt_id") + "&ID2=" + ViewState["ID"].ToString() ;%>' >
Compiler Error Message: CS1026: ) expected
Line 314: <a href='gotopage.aspx?ID=<%#
Compiler Error Message: CS1026: ) expected
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
FIgured out the solution
Also I'm not sure if a numeric can start a query string parameter. Changed "2ID" to "ID2"
<a href='gotopage.aspx?ID=<%#
<%#DataBinder.Eval(Contain
<%#DataBinder.Eval(Contain
</a>