I have a webpage doing a redirection with two URLs parameters: id and bidId and I also have an other webpage with a redirection with two other URLs parameters: id and templateId.
I want to create the route to get a well formed url like those: localhost/12/50 but I have a problem with my routes.
routes.MapRoute(
name: "SubmitBid",
url: "{controller}/{action}/{id}/{bidId}/",
defaults: new { controller = "Tender", action = "SubmitBid", id = UrlParameter.Optional, bidId = UrlParameter.Optional });
routes.MapRoute(
name: "Tender",
url: "{controller}/{action}/{id}/{templateId}",
defaults: new { controller = "Tender", action = "Create", id = UrlParameter.Optional, templateId = UrlParameter.Optional });
When I am to the SubmitBid page the URL work perfectly but if I go to template page I have a url like this: localhost/5/?templateId=0
I don't understand why it's doesn't work and I need your help to understand why it is doing that. Thank you for your help. Karine
Edit: The way I am navigating is like this:
@Html.ActionLink(this.LocalResources("Use"), VIA.Enums.ActionName.UseTemplate.GetStringValue(), new { Id = "0", templateId = item.Id })
@using (Html.BeginForm("SubmitBid", "Tender", new { id = Model.Id, bidId = "0" }, FormMethod.Get, null))
{
<div style="text-align: center; margin: 20px 0 0 0">
<button class="btn btn-large btn-primary" type="submit">@this.LocalResources("Bid.Text")</button>
</div>
}