Integrate Orchard CMS with MVC4 Website - asp.net-mvc-4

I already have MVC4 website and that is to perform Searching (OPAC). Now, We have to integrate it with Orchard CMS. I have followed the procedures to add my existing solution into Orchard CMS solution. Everything is okay but I am not able to get the javascript to work with my view page.
Also, The default Orchard library to include js extensions ie, #Script.Require or #Script.Include also not recognised as intellisense feature in my view page.
When I use default MVC library to include the js like #Scripts.Render is not working as expected.
How can I make my custom javascript to work my page.
Help me to identify the problem.
Thanks

Related

How should I embed Blazor server-side into an existed asp.net core project?

I made a blazor server-side project for submitting the form.
In spite of there is a tutorial of Microsoft about how to embed it in asp.net core(https://learn.microsoft.com/en-us/aspnet/core/blazor/components/integrate-components?view=aspnetcore-3.1). However, I am about to embed it not only in one website but also in some other. So this way is so troublesome.
There is another way by using Iframe. Whereas Iframe does not support CSS vh units well and it has some other limited(such as samesite attribute/cross-origin).
Is there any way to solve this? Thank you.
I suggest you could consider build it as an Templated components.
You could create a component library. And then you could use this template in each project.
Details, you could refer to this article.

Asp.Net core Individual User Authentication Login/Register Pages

I am new to Asp.net core razor pages. I am using asp .net core version 2.2, I am trying to make an application using Social Media authentication services. But the problem I am facing is the weird structure of asp .net core razor applications. I have already done the authentication things, but the problem I am facing is to find the Login and Registration pages. Where can we find them? What if we want to change the layout or something. What should we do for that?
Depending on how you implemented authorization, and based on the documentation :
You should be able to find the scaffolded views in the Areas\Identity's folder of your project or in the ~/Pages/ folder.
If you want to change the layout or something else, you can edit those views (customize) and/or create other ones.
Don't forget to generate the scaffolded views using :
From Solution Explorer, right-click on the project > Add > New Scaffolded Item
Hope it helps.
The default scaffolded Razor pages in ASP.NET Core are made using Partial Views. The default layout of the applicaton can be found in Pages/Shared/_Layout.cshtml.
Inside of this file there is a reference to Pages/Shared/_LoginPartial.cshtml , which contains the layout for the login page. The reference should be somewhere around line 35 in the _Layout.cshtml.
If you want to edit the way the default Razor pages look, this is where you do it.

Is it feasible to convert an single MVC razor view/page into a SPA?

I currently have an ASP.NET Core MVC application with multiple pages with one particular page having a lot of hand-made javascript code and ajax requests. It's becoming quite hard to manage and I would like to move to a framework like Angular, React etc for this particular page only. It is feasible to convert a single MVC view to a SPA app and still keep the other pages? Does anyone have any references on this? Google is not being too helpful...
The simplest way I have found to do this is to use one of the SPA templates and then add the static pages around that.
Here's an an example project I have made that demonstrates the concept by adding a new Razor Page to the angular SPA template.
To do this for an already existing MVC/Razor Pages app I would suggest copying the following from an SPA template project to the MVC/Razor Pages app:
ClientApp
Controllers (SampleDataController.cs)
Views (Home, Shared)
npm_shrinkwrap.json
package.json
tsconfig.json
webpack.config.json
webpack.config.vendor.json
Startup.cs (copy the SPA things)
This is not an exhaustive list but should get someone most of the way.

How can I use PHP files as views in Durandal?

My problem is I want to integrate Durandal witha Wordpress site yet Durandal expects HTML files as views. How can this be changed to use PHP files?
Yes. A php script generates dynamic HTML files on the server. You would just need to generate HTML that is valid within the context of Durandal.
The strategy is similar to using Durandal with ASP.Net, which would be a good place to start looking for tutorials.

How to run dojo on php pages

I have implemented some tutorials of dojo all this tutorials work on html web pages. Is there any way to implement dojo on php pages.
Dojo is a javascript framework that can be used with any server technology. If you have some static html pages with dojo, the only thing you need to do is to rename them to .php.