I'm not familiar with ASP.NET MVC 3 (and more general with the ASP.NET MVC). I can not find any information whether it is possible to use my ScriptControl in ASP.NET MVC 3 project. The ScriptControl was implemented for my previous project in ASP.NET WebForms?
It's more common to use jquery.unobtrusive-ajax.js intead of ScriptManager scripts to use ajax and it's more powerfull to use bundle (only for Mvc4) instead of ScriptManager to manage script links for different configurations and also to minify combine, control caching etc
Yes you can use it. Instead of creating a new page in MVC 3 using Razor, use asp.net web pages for your view.
Although its not recommended. Do it, if you are too desperate.
Related
Is it possible or is it suitable to use umbraco 7.x for webform projects?
I'm a beginner in ASP.NET MVC and I'm learning about it, now.
Now I get a website project that I should do it immediately.
I just can do project with ASP.NET Webform, but I'll immigrate from Webform to MVC in the future.I want to have less problems when I decide to immigrate to MVC.Then I want to use Umbraco 7.x for my project in order to my plan.
Now, my question:
Is it possible or is it suitable to use umbraco 7.x for webform projects?
Short answer is yes, you can mix MVC and Webforms within an Umbraco 7 project. The rendering engine is determined by the template.
If an MVC template is found then it will use MVC as the rendering engine, otherwise it will look for a .master template (in the masterpages folder) and if it finds one it will use Webforms
My project is a web application project in asp.net 4.0. I've taken the steps to be able to add razor '.cshtml' pages. Can I also add mvc controllers for those files or for '.aspx' pages somehow?
Yes, you should be able to do that. Refer to following article ( http://www.hanselman.com/blog/IntegratingASPNETMVC3IntoExistingUpgradedASPNET4WebFormsApplications.aspx)
Yes MVC and WebForms can co-exist.
A good overview is here, though not written for MVC 3 the concepts should be the same.
I have ASP.NET application in which some pages are designed using MVC3 architecture and some with classic ASP.NET (with view state ..etc) I want to merge these two projects in One. Or Is there any predefined Controller in MVC3 that can deal with this specific requirement?
Can we make some URL patterns to be dealt with Classic ASP.NET and some with MVC3 ?
Why YES you can!
http://www.hanselman.com/blog/IntegratingASPNETMVC3IntoExistingUpgradedASPNET4WebFormsApplications.aspx
He also has another post using a NuGet package to integrate the two...
I have an ASP.NET MVC view which contains some plain html. I wanna use this this same view in asp.net. How can i do this?? is this possible?
I am developing an application which contains both ASP.NET MVC and ASP.NET. So i wanna use the same usercontrol accross the application.
Can anyone provide some link/suggestions for the same.
An ASP.NET MVC View relies on HTML helpers which are not available in a normal ASP.NET application. Ideally an ASP.NET MVC view should be served by a controller. On the other hand an ASP.NET webform contains usercontrols and relies on postpack and viewdata which are not available in ASP.NET MVC.
You may take a look at this article about mixing ASP.NET MVC and classic ASP.NET.
So, what's the problem - just put your markup into 'ascx' user control or you could even use WebControl and use it across the app. It does work perfectly for both WebForms and MVC. Just make sure you are not trying to access to any incompatible features - in other words, use just a ASP.NET platform features which are not specific to WebForms or MVC. But since you mentioned it would be just a plain html without any postbacks, MVC helpers, etc. there should not be any issues.
As far as I know, ASP.NET MVC leverages a lot of the features of ASP.NET Web Forms, one of these services is how to get the Html response from the template .aspx file (the view). Can asp.net mvc leverages any other platform to generate html over template files (something like PHP for example)?
EDIT: There is NO use case for this, just curiosity!
Yes, it can! The aspx model is just one of the view template mechanisms. There are others - you can even write your own. The key here is IViewEngine, with WebFormViewEngine being the aspx/ascx provider. ASP.NET MVC In Action covers some of this in chapter 6 "Customizing & Extending the ASP.NET MVC Framework".
you can use other ViewEngines
Spark
NHaml