Is there a way to access a POST value from the View (without passing by the controller)
@using (Html.BeginForm()) {
@Html.ValidationSummary(true)
<fieldset>
@Html.TextBox("SomeValue")
<input type="submit" value="Submit" />
</fieldset>
}
The value being posted is @SomeValue
What is the right syntax for @SomeValue
I think the forms collection could be accessed by:
HttpContext.Current.Request.Form
...but why? It defeats the purpose of MVC.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With