Biulding Querystring

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TCORDON

    #1

    Biulding Querystring

    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.as px?Id=(Insert the value here)'>

    TIA!


  • Ken Tucker [MVP]

    #2
    RE: Biulding Querystring

    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
    ------------------------------------

    "TCORDON" wrote:
    [color=blue]
    > 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.as px?Id=(Insert the value here)'>
    >
    > TIA!
    >
    >
    >[/color]

    Comment

    Working...