0

in my _Layout.cshtml file I have

@Html.Partial("_SearchPartial")

In this partial file I have

@using (Html.BeginForm())
{
    @Html.TextBox("Search")
    <input type="submit" value="Search" />
}                      

Question is, how do I make this form post to a particular action method in a particular controller?

Thanks,

Sachin

Sachin Kainth
  • 45,256
  • 81
  • 201
  • 304

1 Answers1

2
@using (Html.BeginForm("ActionName", "ControllerName", FormMethod.Post)) {

http://msdn.microsoft.com/en-us/library/dd460344.aspx

Alex
  • 34,899
  • 5
  • 77
  • 90