DevExpress ASP.NET - Want to use Razor without MVC - asp.net-mvc

I test the DevExpress (DX) ASP.NET
I want to make website with DX and Razor view.
When I create a new Web Project. I can choose between :
DXperience v12.2 ASP.NET Web Application
DXperience v12.2 ASP.NET MVC Web Application
In the choice 1, I can't choose the view language, Visual Studio create an ASPX website.
If I choose MVC, in the creation wizard, I can choose Razor or ASPX.
My question is can I create a website using Razor view without the MVC ?
I don't know the MVC pattern and be affraid to learn it now, I don't understand the logic inside it...

Depending on what you are specifically looking to do, you should check out RazorEngine - it lets you render HTML from Razor without alot of the scaffolding that you will have to do in order to use Razor like MVC uses Razor...

Related

Ajax ToolKits and MVC

Can I Install Ajax controls ToolKits in Asp.net Mvc project When I working in Razor!
When I work on razor there is no ant tools Like Web form instead when you select html.cs after create new project in MVC
You cannot. ASP.NET MVC does not support the Ajax toolkit because they are designed for WebForms projects. As the commentor above mentioned, there are other ways to add reusable code to an MVC application.

How to add new aspx page in asp.net 5 application

I have created a new ASP.Net 5 application as empty and tried to add the aspx page through add new item. but there is no options to add aspx page rather that we can have all other items like view, controller, class library.
Any suggestion is greatly appreciated.
Thanks in advance.
Files ending in .aspx are part of the Web Forms framework. ASP.NET 5 does not support Web Forms at all, nor will it ever support Web Forms. If you want to create a Web Forms application using Visual Studio 2015, you should choose Web Forms from the ASP.NET 4.6 Templates instead.
ASP.Net 5 is like ASP.Net MVC, you cannot add .aspx page but .cshtml razor view into your Views folder.
ASP.NET 5 support both MVC and webfrom. We have choose web application templet with Web Form, MVC or API.
https://docs.asp.net/en/latest/tutorials/your-first-aspnet-application.html

MVC empty WebSite project based on aspx pages

In Visual Studio we have a two ways that create the web projects.
I create the "WebSite" project, empty-project (like: File -> New -> WebSite... and so on).
After that, when the WebSite created I want to make it to MVC WebSite with ASPX, and not Razor pages.
[I decide create the MVC WebSite not Project Site, with this way, because the Visual Studio doesn't provide us WebSite with MVC template based aspx pages].
After creating some pages I want to create and integrate any Razor page.
Describe for question:
IF I attempt use in the Razor view page - " #model MyWebSite " it does not discovering, and I can't use with the ViewBag property later
Question:
What Can I do ?
What NuGet packeg I need install or what dll recourse I need adding to Bin folder of project.
Yes, you can use Razor with an existing ASP.NET WebSite. Simply open your website using the WebMatrix tool and start adding CSHTML files. One caveat is that if your website is using WebForms controls the WebMatrix tool will not provide any help working with them in existing aspx pages. Additionally, Razor does not support WebForms so you will not be able to add something like to a CSHTML file.

Sample application for asp.net mvc

I have worked on asp.net 2.0 years ago and recently worked on SL and WPF applicaiton have idea on mvvm. As my next project would be on ASP.net MVC DotNet FW 3.5, I was looking for sample application code using MVC any links\forum on this would be of gr8 help.
Welll I was going through http://www.asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-3 and noticed the view uses cshtml file extension rather aspx and was confused. Please, point me to some refernces to start as a biggner.
First of all i'd recommend MVC4 and .Net 4.
The easiest way to learn is create a new project using the default MVC 4 internet project template. It has all the basics covered.
The most important about MVC is that you forget about webpages being files on disk. The .aspx and .cshtml files in MVC are views returned by a controller. A controller is a class which has functions, called Actions in MVC terms. If you have an url /Home/Index MVC would call function Index in controller class Home.
The .cshtml extension is used by view template files rendered by the ASP.Net MVC3 Razor View Engine. I often find videos to be great introductions to topics about which I want to learn more.

Side-by-Side Asp.Net and MVC Razor

We have an existing ASP.Net Web Application. I would like to create an ASP.Net MVC Razor Application where the two applications will work together. A single Master Page would contain menu items that can call .aspx pages as well as Razor .cshtml pages.
I have seen an example using MvcContrib Portable areas utilizing Routing. This particular example has .aspx pages in both (the MVC was not Razor).
Is there an example out there that will show the two running side-by-side and the MVC is Razor? It would be best if I could download a visual Studio Solution so that I can run this.
I am not sure if the MvcContrib way is the latest and best way to achieve this.
I do not want to go Hybrid!
You don't need any other external librarry. You can always convert the existing ASP.NET web forms Project to be a Hybrid one which uses webforms and MVC. You need to add the required MVC assembly references and make some changes to the web.config and you are all set. Scott has a simple and awesome blog post about this where he explains how to do the conversion.
I scribbled a note about how to enable the MVC specific Context menu( Add Controller / Add View) in the hybrid project after conversion here

Resources