Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

mvc, view, asp.net

Posted on 2013-11-06
2
Medium Priority
?
324 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 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Suggested Courses

926 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