QueryString construction

  • Thread starter Thread starter TCORDON
  • Start date Start date
T

TCORDON

How can I insert a value that i have in a variable (codebehind) into the
html part of the page to build a querystring?

Say: <A href='MyPage.aspx?Id=(Insert the value here)'>

TIA!
 
One approach is to use a server side <asp:HyperLink> control instead
of a naked <a>nchor tag, and then you can reference the link with a
variable and set the NavigateUrl property programatically.

link.NavigateUrl = "MyPage.aspx?id=" + myId;
 
Back
Top