?
Solved

View markup in MVC 4

Posted on 2013-01-10
2
Medium Priority
?
191 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
Roopesh Reddy earned 400 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month15 days, 8 hours left to enroll

741 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