Solved

View markup in MVC 4

Posted on 2013-01-10
2
184 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
Comment Utility
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
Comment Utility
Thanks. Been traveling. Sorry about the delay. Have a great week!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

743 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

16 Experts available now in Live!

Get 1:1 Help Now