Closed dcraigen closed 10 years ago
something like this?
@using (var f = Html.Bootstrap().Begin(new Form().RouteValues(new { ... })))
I've checked currently available overloads on MVC's BeginForm()
method. None of them have "routename" as a parameter. So I'm not sure how I'd implement it since BMVC uses regular MVC's methods under the hood.
In MVC you would use Html.BeginRouteForm("RouteName")
On 18 August 2014 04:15, Dmitry A. Efimenko notifications@github.com wrote:
I've checked currently available overloads on MVC's BeginForm() method. None of them have "routename" as a parameter. So I'm not sure how I'd implement it since BMVC uses regular MVC's methods under the hood.
— Reply to this email directly or view it on GitHub https://github.com/DmitryEfimenko/TwitterBootstrapMvc/issues/324#issuecomment-52447004 .
Indeed I've never found myself in the situation when I'd need to use it, therefore the lack of knowledge about it.
Is there a significant benefit of using it compare to the regular BeginForm()
?
I'd rather avoid implementing it because it would not be as simple as sticking an extension method on the BMVC's Form
class.
Also, you are the first one to ask about it.
I use friendly route names for some of my pages for SEO purposes, the standard stuff like actions is all great as I can specify RouteName() but for forms, when the form is posted using the current form methods it loses the URL in the address bar and replaces it with the default route, not a problem for my SEO as this is never indexed but just makes the URL's look ugly as they are using Guid's for my Id's.
On 18 August 2014 06:02, Dmitry A. Efimenko notifications@github.com wrote:
Indeed I've never found myself in the situation when I'd need to use it, therefore the lack of knowledge about it. Is there a significant benefit of using it compare to the regular BeginForm()? I'd rather avoid implementing it because it would not be as simple as sticking an extension method on the BMVC's Form class. Also, you are the first one to ask about it.
— Reply to this email directly or view it on GitHub https://github.com/DmitryEfimenko/TwitterBootstrapMvc/issues/324#issuecomment-52452436 .
as far as I know, the parameters of the POST
form do not end up in the url. They are in the request body. Could you show me an example of a form that you have?
Would it be possible to have a .RouteName(string routeName) on the Form which just overwrites the action. The MVC BeginRouteForm just uses UrlHelper.GenerateUrl with the route name to set the action.
On 18 August 2014 06:09, Daniel Craigen dan@craigen.net wrote:
I use friendly route names for some of my pages for SEO purposes, the standard stuff like actions is all great as I can specify RouteName() but for forms, when the form is posted using the current form methods it loses the URL in the address bar and replaces it with the default route, not a problem for my SEO as this is never indexed but just makes the URL's look ugly as they are using Guid's for my Id's.
On 18 August 2014 06:02, Dmitry A. Efimenko notifications@github.com wrote:
Indeed I've never found myself in the situation when I'd need to use it, therefore the lack of knowledge about it. Is there a significant benefit of using it compare to the regular BeginForm()? I'd rather avoid implementing it because it would not be as simple as sticking an extension method on the BMVC's Form class. Also, you are the first one to ask about it.
— Reply to this email directly or view it on GitHub https://github.com/DmitryEfimenko/TwitterBootstrapMvc/issues/324#issuecomment-52452436 .
This is done. Please get latest and let me know if it works all fine for you
It would be nice to be able to specify a RouteName on a Form similar to the ActionLink Helpers.
Any chance or am I missing a method somewhere?
DAn