I have a web page (one of many). But on this particular web page the following doesn't render.
@using (Html.BeginForm()) {
<h1>bbbbbbbbbbbbbbbbbbbbbbbbbb开发者_如何学运维bb</h1>
}
The only difference between this and other web pages is that I have dynamically created this link to this page with jQuery rather than hardcoding the link on the page. When I check the link it looks like this:
<a href="/adminStats/Edit?PartitionKey=P22&RowKey=01-01-0001">Edit</a>
Is there something about BeginForm that can't see the page address so it doesn't create the form link?
Robert
I had the same problem. Check for nested form tags.
I'm assuming that if you don't specify the route values, BeginForm
will try to create the form action based on the current request context. That being said, if that's not the current view's URL then it shouldn't matter. So, in the end, I would say that that link has no effect on BeginForm
, but something that BeginForm
needs from behind the scenes (out of your control) is not available, and thus BeginForm
is silently failing.
You can try exploring the source for BeginForm
and see what potentially might be missing...
精彩评论