Solved

mvc, view, asp.net

Posted on 2013-11-06
2
307 Views
Last Modified: 2013-11-22
<form
                                         method="post"
                                         action="/xxx?inputState=@inputState&inputBond=@inputBond"  
                                         enctype="multipart/form-data"
                                         >

How to convert above to @html.begin()?
in razor/c#/asp.net/mvc
0
Comment
Question by:solution1368
2 Comments
 
LVL 16

Expert Comment

by:Stephan
ID: 39630172
How is your route for the form action?
/xxx?inputState=@inputState&inputBond=@inputBond

Open in new window

0
 
LVL 23

Accepted Solution

by:
Ioannis Paraskevopoulos earned 500 total points
ID: 39630203
@using (Html.BeginForm("YourActionName", "YourControllerName", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    <fieldset>
        @Html.EditorFor(m => m.Phone)
        @Html.EditorFor(m => m.SSN)
        <input type="submit" value="Submit" />
    </fieldset>
}

Open in new window


Just replace YourActionName and YourControllerName with the appropriate values.

Giannis
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question