I've a question considering passing information from one page to another. I'm sure there's several ways and I'm open for all of them.
I've heard of passing parameters to the controllers, URL-paremeters, cookies/local storage and even though I know how to do it with cookies/local storage - I would like to do it with the backend.
I can simply link to "www.website.com/page" and add "?id=123" to the end of the URL for a total: "www.website.com/page?id=123" where 123 is the ID and should be dynamic.
So thats how to set the url parameter. To get the value of the parameter (in this case the parameter "id" has the value "123") simply use this code: string ID = Request.QueryString["id"];. Now ID has the value of the query parameter "id" - in this case "123" and you can use it however you want in your code :)
Pass information from one page to another
Hi again!
I've a question considering passing information from one page to another. I'm sure there's several ways and I'm open for all of them.
I've heard of passing parameters to the controllers, URL-paremeters, cookies/local storage and even though I know how to do it with cookies/local storage - I would like to do it with the backend.
Thx for the help
I found the answer myself.
I can simply link to "www.website.com/page" and add "?id=123" to the end of the URL for a total: "www.website.com/page?id=123" where 123 is the ID and should be dynamic.
So thats how to set the url parameter. To get the value of the parameter (in this case the parameter "id" has the value "123") simply use this code:
string ID = Request.QueryString["id"];
. Now ID has the value of the query parameter "id" - in this case "123" and you can use it however you want in your code :)is working on a reply...