I’m building a webapplication in ASP.NET 4.0.
Now I don’t know the terminology for this, so it may be a stupid title and easy to find but I have tried to find a solution before posting here. But I really don’t know what this is called..?
Question:
How do I read variables from the URL?
Let’s say I type in
http://www.mysite.com/search/John/Doe
I want to take out “John” and “Doe” directly from the url, and set them as variables.
Also when visiting http://www.mysite.com, how do I add do so that the info in my textboxes add to the back one the url without reloading the page? But still processes my request?
If you are in asp.net 4 you can use Url Routing as follows;
In Globle.asax
For http://www.mysite.com/search/John/Doe
In SearchPage.aspx