Category "asp.net-mvc"

How to render MVC child Action PartialView into Layout @RenderSection()?

In the layout, MVC child actions are called in . However, the the partialView results are not shown in the RenderSection("userProfile", required:false). The Wa

How to add project reference to ASP.NET Core 1.0 MVC project

I have a ASP.NET Core 1.0 MVC app in solution X and I have some common projects (.net 4.5.2 class libs) in solution Y. I want to reference the projects in solu

Using 'UseMvc' to configure MVC is not supported while using Endpoint Routing

I had an Asp.Net core 2.2 project. Recently, I changed the version from .net core 2.2 to .net core 3.0 Preview 8. After this change I see this warning message

My SelectList based on an enum cannot update the database

I have a simple Html.DropDownList that is backed by a SelectList which, in turn, is backed by my enum. Enum Colors Red=1, Green, Blue I add an option label to

How to use jquery in ASP.​NET Core

I created a ASP.NET core template and wrote a jquery script. When I look at the page I see that jquery is loaded into the page, but the script doesn’t run

Using Razor within JavaScript

Is it possible or is there a workaround to use Razor syntax within JavaScript that is in a view (cshtml)? I am trying to add markers to a Google map... For exa

mvc 4 Model is null

i'm using razor's listboxfor for the first time, but my Model is always null. after reading similar posts and tryouts it still won't work. Person.cshtml @mode

The name 'EntityState' does not exist in the current context

In Entity Framework, this sometimes occurs when the System.data.entity assembly is not added into the Project. But, why I didn't have this error before in other

Is there a nameof() operator for MVC controllers in C#?

The newly introduced nameof operator is useful in making my code my "typed". Instead of return RedirectToAction("Edit"); we can write return RedirectToAct

playwright- issue with login form - how to navigate to next page

I have a website where I enter the username and password, then I click on the recaptcha field and enter the numbers without any problems but when the login butt

Secure cookies flag always getting lost in first session after resetting IIS

Looking for solution for ASP.NET_SessionId should always be secure flag true when request is from secure connection. Below Steps are done to achieve - Created M

Using a QRCode scanner in an inappbrowser with cordova and MVC

I have to make a qrcode scanner for a mvc application that is embedded in cordova as an in app browser. So far I can scan a qrcode in cordova app: document.addE