I have a view with a textbox and a button. I want to take the textbox and take the contents of what a user types in and put it as a “Get” variable in the URL. Does anyone have a simple example of this?
I want it to print into a url like this: /Profiles/Search?searchstring=hello
I am using razor built in mvc3 view
If you’re using a strongly typed view, you could do:
Otherwise, with a weakly typed view: