is this data generated on the page load or by something the user does on the page?
If on the page load you can just do:
var abc = "hello";
<a href="result?abc=@abc">uk</a>
That will pass the variable to the result page on a URI variable. You can easily get this via:
var abcFromUrl = Request.QueryString["abc"] ?? string.Empty;
If it's based on a user selection on the page without a page reload then you could easily set a URL variable or cookie in Javascript or set a session variable via AJAX - lots of ways of doing this, depends on what you're doing.
Pass data from one page to another on anchor tag click.
Hello all,
I want to send data from my one page to another on link.
Below code is in template.
I want this var abc value "hello" in page result.
Any help would be much appreciated !
thanks,
Ronak Panchal.
Hi Ronak,
is this data generated on the page load or by something the user does on the page?
If on the page load you can just do:
That will pass the variable to the result page on a URI variable. You can easily get this via:
If it's based on a user selection on the page without a page reload then you could easily set a URL variable or cookie in Javascript or set a session variable via AJAX - lots of ways of doing this, depends on what you're doing.
Steve
is working on a reply...