variable passing by URL
-
I need to pass a variable from one page to the next using the URL. Example: I have selected JJJJJ from a drop-down menu and I click Send, which sends an email to a user saying to go to a certain website and that website that is linked to in the email needs a string variable to be assigned JJJJJ. Kind of like this forum being linked to by ?forumid=12076 I am using Visual Web Developer Express with ASP.NET and a codefile in VB. Any help is appreciated.
-
I need to pass a variable from one page to the next using the URL. Example: I have selected JJJJJ from a drop-down menu and I click Send, which sends an email to a user saying to go to a certain website and that website that is linked to in the email needs a string variable to be assigned JJJJJ. Kind of like this forum being linked to by ?forumid=12076 I am using Visual Web Developer Express with ASP.NET and a codefile in VB. Any help is appreciated.
Hi there, I guess you can do that, what you might need to do is to append the variable value to the URL of the target page, then redirect the user to the new page. In the target page, you can read the value from the
QueryString
property of theRequest
object. You can read more about passing values between pages in MSDN: How to: Pass Values Between ASP.NET Web Pages [^] -
I need to pass a variable from one page to the next using the URL. Example: I have selected JJJJJ from a drop-down menu and I click Send, which sends an email to a user saying to go to a certain website and that website that is linked to in the email needs a string variable to be assigned JJJJJ. Kind of like this forum being linked to by ?forumid=12076 I am using Visual Web Developer Express with ASP.NET and a codefile in VB. Any help is appreciated.
U can do that by dim id =Request.QueryString("forumid") id gets the value of 12026 "Aim to go where U have never been B4 and Strive to achieve it" http://groups.yahoo.com/subscribe/dotnetforfreshers http://himabinduvejella.blogspot.com
-
Hi there, I guess you can do that, what you might need to do is to append the variable value to the URL of the target page, then redirect the user to the new page. In the target page, you can read the value from the
QueryString
property of theRequest
object. You can read more about passing values between pages in MSDN: How to: Pass Values Between ASP.NET Web Pages [^]hi, when you redirecting to a page, just add the query string with the url as follows. Response.Redirect("yourRedirectedForm.aspx?url=linktoform.aspx"); Then at the page YourRedirectedForm.aspx access the querystring as follows. string url = Request.QeryString["url}]; Response.Redirect(url); In this way you can do this. Thanks and Regards Gowtham Sen.