Biulding Querystring

  • 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!
 
Hi,

Assign an id to the link and make it runat the server. Try this.

<a runat = server id = "MyLink" href = "webform1.aspx">click me</a>

in code behind

MyLink.href = "webform1.aspx?ID=2"

Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top