Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Thursday, April 10, 2014 7:15 PM
HI, I was just reading some stuff and saw the statement that we can create the web pages three ways in asp.net MVC, Web Pages and web forms. Is there a major difference between web pages and web forms, or is there something that I can't do that is not possible achiving web forms.
At work we are still using 2005 3.5 .net framework eventhough we have 2012. So i get it I dont need to have web matriks since i have 2012. I saw some of the sample codes that is very simple done souce code page by mixing c# code and HTML. Can I do the same in VS2012?
All replies (10)
Friday, April 11, 2014 3:20 AM ✅Answered
There's some incorrect information provided in this thread already. So here's some clarification and direct answers to your questions:
Yes, there is a major difference between the Web Pages framework and Web Forms. Web Forms uses server controls and the programming experience is more like working with Windows Forms and controls. Web Pages is very much like PHP or classic ASP and lets you work much closer to HTML and HTTP. Both development models are built on ASPNET so there is nothing you can do with one optionthat you can't do with the other. The difference is in programming experience, not end result.
You can use VS 2012 to build Web Pages sites. You go to New » Web Site and choose Razor (v2). I wouldn't recommend using WebMatrix. Visual Studio provides full Intellisense and debugging tools. WebMatrix doesn't provide any debugging and only limited IntelliSense.
You can develop multi-layer Web Pages sites. I strongly recommend developing each layer as a separate class library though.
I'm not sure where A2H got his definition of Web Pages from, but it does not describe the ASP.NET Web Pages framework at all. It seems to describe ASP.NET (compared to plain static html files).
Ashim Chattergee says that Web Form is obselete. That is not true. That framework is still being developed by Microsoft.
Saturday, April 12, 2014 2:59 AM ✅Answered
If i am starting a new project I can begin this in web pages, or with in the exiwting project when creating a new page I can chose to work on Razor syntax, and when I do that I would call it web page,
Not quite. ASP.NET Web Pages is a development framework. ASP.NET Web Forms is another and ASP.NET MVC is a third.
if i use HTML 5 i can call it web pages.
You can use HTML5 regardless whether you are programming in Web Pages, Web forms or MVC.
So once I read that if a project consist of 10 pages then web pages is good and if it is bigger than that one rahter use MVC or web forms.
The person who said that didn't know what they were talking about. You can use Web Pages for large sites. I am building a project which has a lot more pages than that and I'm using Web Pages. I built a CMS using Web Pages which also has a lot more than 10 pages.
Thursday, April 10, 2014 9:00 PM
See another post below
http://forums.asp.net/t/1694061.aspx?Difference+between+Web+Fom+and+Web+Page
Thursday, April 10, 2014 9:12 PM
aammiz
difference between web pages and web forms
**Asp.Net Web Forms **Asp.Net Web Forms is a high level component oriented web framework that works with controls like buttons and grids that encapsulate behaviour and view. It is the most popular flavour of ASP.NET but has been criticised for the lack of control over the generated markup.
ASP.NET Web pages as the programmable user interface for your Web application. An ASP.NET Web page presents information to the user in any browser or client device and implements application logic using server-side code.ASP.NET Web pages allow you to create dynamic content for your Web application. With a static HTML page (.htm or .html file), the server fulfills a Web request by reading the file and sending it as-is to the browser. In contrast, when someone requests an ASP.NET Web page (.aspx file), the page runs as a program on the Web server. While the page is running, it can perform any task that your Web site requires, including calculating values, reading or writing database information, or calling other programs. As its output, the page dynamically produces markup (elements in HTML or another markup language) and sends this dynamic output to the browser.
Source URL: Asp.Net Web Forms vs Asp.Net Web Pages
Friday, April 11, 2014 12:04 AM
Sorry the porivided link and the defination neighter one of them helped me understand.
Because I want to figure out which one I used over other. Ofcourse I found razor code fast and readable. so i will go for that but is there a reason if somene suggest to keep using web forms. Are we limited to do certain stuff when working on the web pages.? One certainly I can get it is that web pages does not have drag and drop controls which is okay, is there anything else?
If I have a current environment where we are using webforms I will likely continue working on it. But if i start a new project and it involved multiple projects and 4 layers structure. could i still use it?
I read the word "light weight" what does that mean.
Friday, April 11, 2014 12:51 AM
Webpages are just small php-like (with Razor) script files wich turn out html.On the other hand Web forms is the old asp.net technology, their versions distributed with the .Net framework. Web pages are dynamic html. Razor + Web Pages has really high learning curve and it is quite overkill in many cases. Web Pages is a lot simpler. Razor + Web Pages = simple dynamic HTML generation and program in C# at server side.
So i prefer Web pages over web forms as the later is obsolete.
Friday, April 11, 2014 3:29 AM
Mikesdotnetting
Ashim Chattergee says that Web Form is obselete. That is not true. That framework is still being developed by Microsoft.
I am so sorry for this ..... i had no idea that web form framework are still being developed.Thanks for rectifying mike.Appreciated, :)
Saturday, April 12, 2014 1:02 AM
so it is just user experience.
If i am starting a new project I can begin this in web pages, or with in the exiwting project when creating a new page I can chose to work on Razor syntax, and when I do that I would call it web page, if i use HTML 5 i can call it web pages. So it is just if I am using the build in asp.net controls I would call it asp.net web forms. if i use razor syntax I would call it web pages. So once I read that if a project consist of 10 pages then web pages is good and if it is bigger than that one rahter use MVC or web forms. so I conclude that, that statement is wrong as well.
Thanks for the answer Mikesdotnett, just let me know what i am sayingnow it is correct.
Saturday, April 12, 2014 1:40 PM
I have no experience except with webpages, the code is easy to read and there is a lot less of it.
I have two monitors: one has webmatrix with the database page open, the other has visual studio with the code.
Monday, April 14, 2014 8:46 AM
aammiz
HI, I was just reading some stuff and saw the statement that we can create the web pages three ways in asp.net MVC, Web Pages and web forms. Is there a major difference between web pages and web forms, or is there something that I can't do that is not possible achiving web forms.
At work we are still using 2005 3.5 .net framework eventhough we have 2012. So i get it I dont need to have web matriks since i have 2012. I saw some of the sample codes that is very simple done souce code page by mixing c# code and HTML. Can I do the same in VS2012?
Mike explained it well , but I'll throw in my own definition as well.
WebPages - WebPages is light weight framework compared to Web Forms, You can use C# or VB as your server side language and HTML/HTML5 CSS3, jquery or whatever on front end. The framework was (and probably still is) for beginners who wish to learn ASP.NET, but don't want to get thrown into complicated stuff (MVC *Cough*). However don't be put off by it being for beginners, it is still as powerful as Web Forms and MVC. The disadvatange is that it has no code seperation and, it can get quite messy if you do not plan ahead.
Web Forms - Web Forms is also good especially for RAD. It also has code seperation and probably a better site structure (but it can get messy!). (I use Web Forms at work, but still prefer Web Pages, due to ease of use)
To answer your question there is no huge difference.
Web Forms:
Better code seperation
Drag and Drop Controls
Event driven
Web Pages
Easy to learn and use
Quick data access
You don't get a ton of view state errors!
Both have .Net Framework so are powerful as each other. however if you plan to build large scale enteprise websites and wish to use razor templating engine I really suggest MVC. You can use WebPages but make sure you take a good organisation approach otherwise code will be everywhere..You can still use EF with WebPages..