2
votes
4answers
1k views

Is it possible to change the querystring variable in ASP.NET MVC path before it hits the controller?

I have a controller method in ASP.NET MVC that looks like this: public ActionResult GetAlbumPictures(int albumId) { var album = AlbumRepo.GetSingle(albumId); var pictures = album.Pictures; ...
4
votes
1answer
1k views

MV3 Duplicate Query String Values for CheckBox (true,false for boolean)

I've created a fairly straight forward page with a check box: @using (Html.BeginForm("MyController", "MyAction", FormMethod.Get)) { @Html.CheckBoxFor(x => x.MyCheckBox) <input type="submit" ...
1
vote
1answer
2k views

mvc3: html.beginform search returning empty querystring

In an MVC3 app, i have the following View: @using (Html.BeginForm("Index", "Search", new {query = @Request.QueryString["query"]}, FormMethod.Post)) { <input type="search" name="query" ...
0
votes
1answer
702 views

ASP.NET MVC routing: with querystring to one action, without to another

I need the following routes: example.com/products goes to a product categories page (e.g. cars, trucks, buses, bikes) controller=Products, action=Categories() example.com/products?a=1&b=2 goes ...