Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dipa 88 posts 370 karma points
    May 27, 2016 @ 07:07
    Dipa
    0

    Pass paramater with Page.Url

    Hello,

    I got stuck at one step. In href now I am passing Page.Url and it is working fine.

    But now I want to pass one parameter also to next page. Is it possible with query string? If yes then how it can be done? I tried but didn't get success.

    Guide me how to pass parameter with Page.Url?

    Thanks, Dipa

  • Steve Morgan 1346 posts 4453 karma points c-trib
    May 27, 2016 @ 07:43
    Steve Morgan
    100

    When you output your a href tag you should just be able to append on a parameter.

    // a link with url encoding -  which you'll probably want/need...
     <a href="@(Page.Url + "?myparam="+Url.Encode(myParamValue))>A link</a>
    

    Show us your code - it's hard to suggest something if we don't know what you're trying to do!

    Steve

Please Sign in or register to post replies

Write your reply to:

Draft