CipherIS
asked on
ASP.NET <a href create query string param issue
I am having an issue with my <a href returning a value to dynamically create a query string param.
when I mouse over it shows as:
http://localhost/mypage.aspx?ID=
I need it to display
http://localhost/mypage.aspx?ID=5
Any ideas?
<a href='mypage.aspx?ID=<%# GetID() %>'>test</a><br />
protected string GetID()
{
return ViewState["ID"].ToString();
}
when I mouse over it shows as:
http://localhost/mypage.aspx?ID=
I need it to display
http://localhost/mypage.aspx?ID=5
Any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<a href='mypage.aspx?ID=<%# Eval(GetID()) %>'>test</a><br />
ASKER
When I remove the # it errors.