Solved

View markup in MVC 4

Posted on 2013-01-10
2
185 Views
Last Modified: 2013-01-14
In my view, I noticed that their are two different ways to start of my view form.

Here is the first one :  
@using (Html.BeginForm() )
{

}


Or you can just use :
@{



}


Are these two basically equivalent, or is one better than the other?
0
Comment
Question by:brgdotnet
2 Comments
 
LVL 23

Accepted Solution

by:
Roopesh Reddy earned 100 total points
ID: 38766024
Hi,

The first one renders the controls inside the  <form>! Basically if you require FORM tag to be rendered, you will use that! It's an HTML Helper for <form> tag!


The Second one is general, to render the general Server Side Code!

More info on Razor - http://www.asp.net/web-pages/overview/more-resources/asp-net-web-pages-api-reference

Hope it helps u...
0
 
LVL 2

Author Closing Comment

by:brgdotnet
ID: 38776895
Thanks. Been traveling. Sorry about the delay. Have a great week!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

861 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now