I have an existing MVC razor page application. From the home page that is implemented in MVC razer page when I click on login button other pages I need to implement in the VUE JS . How can do that ? How do I put link to the vuejs component.
If you want the login button can link to a vue component, it should be in a Vue Instance, then use vue router to do the redirection.
But if you want to have a single page application, and mixing asp.net mvc views with vue.js is not a good idea. Eventually, you will face many problems. It could be better implement web api services with dotnet core and vue as the client
Related
I maintain an ASP.NET MVC web application that uses the conventional MVC architecture except for any route that starts with /admin, which is handled by an older WebForms architecture. The MVC and WebForms code coexist in the same .NET 4.8 Framework project, and the user of the site can't even tell there's any difference, because the styling is the same and we use url prettifying tricks so that you can request /admin/something rather than /admin/Something.aspx.
This all works fine, except that WebForms is really showing its age and now we want to port the admin stuff to Vue. But I can't figure out how to deploy Vue such that it has the same coexistence with MVC.
I know that I could continue to use Razor pages and add Vue with a script tag, progressive enhancement style, but I think that makes it impossible to use single file components, which is one of the Vue features that seems important.
It seems like the most functional way to use Vue is to create a proper Vue site, with build step tooling, but how can I do this within an existing MVC project and just delegate one route to the new code, and port other routes over as needed?
I have built a Blazor server app which utilises a Razor Class Library to host razor pages. The app works perfectly when I call any razor page in the RCL from the NavMenu in the Blazor Server app.
However, I'm trying to figure out how to return to a page in the Blazor Server app from a link in the RCL Razor page or Controller.
Could anyone advise me on how to do this?
I have an asp.net mvc website and inside a page, I would like to have a WebBrowser to browse other sites.
Is it possible ? OR at least to display a single external Webpage without leaving my page...
If yes, what is the best way to do it ?
ASP.NET MVC is an Web Project. not a native Application.
If you want to insert a WebBrowser, use Iframe tag in view page.
<iframe src="http://somewebsite.com/path/to/show" width="100" height="100"></iframe>
All the action is client side in a SPA app. The Visual Studio Durandal and Hot Towel project templates both serve the SPA out of an ASP.NET MVC application.
What, if anything, does the ASP.NET MVC infrastructure bring to the party? As far I can see all it does is make it hard to serve a WCF Web Service (ajax enabled) out of the project web.
Yet both of the project templates are set up like this. What have I missed?
As a matter of fact, ASP.NET MVC in this template is not necessary. All it does is serve the initial Razor template for the SPA and provides you with the bundling and optimization support of all the client side javascript resources for the application so that when you deploy your application you don't end up with gazillions of HTTP requests from the client to fetch all the .js crap necessary for the application to work. Of course you could perfectly fine have used the bundling feature outside of ASP.NET MVC in a simple and plain ASP.NET web application.
What, if anything, does the ASP.NET MVC infrastructure bring to the party?
See the documentation:
Hot Towel builds on the familiar and powerful ASP.NET MVC structure.
App_Start
Content
Controllers
Models
Scripts
Views
As far I can see all it does is make it hard to serve a WCF Web Service (ajax enabled) out of the project
You can't just right-click your project and add a new WCF Service?
I am using ASP.net mvc to create a login page. However, I would like to know if there are any ASP.net MVC login templates or themes I can implement. I am going for a minimal theme. So something clean. I would appreciate if you could direct me to any sites as I cannot find any help on google.
If you're new to css and html design in general... I would point you toward using bootstrap by twitter. Here is a sample login form
Visual Studio comes with templates, when creating an MVC application select the internet application template.
Here is the description:
A default ASP.NET MVC 4 project with an account controller that uses
forms authentication.
You can tweak it to meet your needs.