Category "asp.net-mvc"

Cant Host .net application to iis server

I was trying to publish dotnet MVC application to IIS .I created a site in that and opened in the browser .but it looks like this how to run my app on IIS.

Why Highlight Menu Item Doesn't Work in ASP.NET MVC?

Why Highlight Menu Item Doesn't Work in ASP.NET MVC? I am testing the method for highlighting the selected menu item in a MVC program. The test environment incl

The auto generated error message shows the date format as 'yyyyy/mm/dd' instead of 'mm/dd/yyyyy in ASP.Net MVC application

I am working on ASP.Net MVC 4.7.2 app. It has a date field where user can select or type the date. If user enter the date with year yyyyy (the length of year is

ampersand symbol in url param, after encoding also throwing an error - MVC

In one of my action methods , I do have a parameter "filename", which some times can be a string with ampersand symbol. The problem is when ever we have an ampe

How to render and preserve <br> tags as line breaks using @Html.TextAreaFor

I'm migrating an ASP Classic app to ASP.Net MVC 5. The legacy data contains <BR> tags in the text. In the old application (still in use) the tags are rend

After upgrade to asp.net 5.2.3, CORS isn't working for "*" origins

I have a project using web api and one using asp.net mvc. They are configured using CORS module. The project using Web Api is configured to allow any origin be

Getting ReactJS/TypeScript to work with new clean MVC5 project

I've already tried nearly all available tutorials to get a simple MVC5 project to run using TypeScript and ReactJS. Note: I've created the projects from scratch

How to load razor page before it's done rendering?

I have a table of records in Index.cshtml, once a user clicks on a record to view the details it will take them to Details.cshtml. The issue is, there is a lot

Entity Framework get real-time value from database

I have a nopcommerce website. I find a problem. Please see below code // My account / Order details page [HttpsRequirement(SslRequirement.Yes)] public virtual I

DotNetCore 1.0 MVC how to automatically redirect to a single domain in live

I have multiple domains for a website: http://example.com http://www.example.com http://www.example.co.uk In production, I want the primary domain to be htt

Using jquery timepicker with views in mvc

I have an ASP.NET MVC project. I would like to use jquery timepicker in the view side. Here is the jquery timepicker : http://jonthornton.github.io/jquery-timep

A fatal error occurred. The required library libhostfxr.dylib could not be found

I'm working on ASP.NET Project with .NET 5.0. For Database creation, I've run the command dotnet tool install --global dotnet-ef After the installing, when I

Can not find "locale.properties" file from PDF.js

I use this plugin: PDF.js. I am trying to solve the problems that show in console log. Follow image: Here is a simple project ready, only download and run

'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

I want to access root url of a Web application from a Windows forms Application. string rooturl = Billing_XML_WebTracking.WebForm1.RootUrl; string url = rootur

JQuery Filterizr doesn't work correctly with a large list

In my Asp.net MVC application, I use Jquery and to filter a product list. It works perfectly with a list of products of 80-90 elements. But when there is a larg

Bootbox does the same for "ok" and "cancel" callback. It does the same for prompt as well

Bootbox closes and stays on the same page. It should redirect to a different page onClick and "ok" after that. It is an MVC application and redirects to Index a

Can't Add View from Controller in VS 2015 : "There was an error running the selected code generator"

I'm following a video tutorial where I'm required to create an empty ASP.NET Web Application with MVC, using Visual Studio 2015, being new to ASP.NET world, I'm

OpenIdConnectProtocolValidator - nonce error

I'm using OpenIdConnect authentication on my azure website (azure active directory, c#, MVC) and I'm randomly getting this error IDX10311: requireNonce is t

Do not add to list if it is null c#

I am trying to create a list from anonymous function. I want the list to be created if request model properties are not null. Currently, it is adding null to th

Swagger not loading - Failed to load API definition: Fetch error undefined

Trying to setup swagger in conjunction with a web application hosted on IIS express. API is built using ASP Net Core. I have followed the instructions prescribe