Category "asp.net-mvc"

How to Get the length of the Characters in grid using Jquery in C# MVC

i want to get the number of characters in Grid from the below Jquery script Even though i tried by length(data) it shows that length is a property not a functi

GoogleOAuth2 always return access denied to callback url

Im trying to Use GoogleAuthenticationExtensions from Microsoft.Owin.Security.Google package inside MVC5 program. This is my StartUp.cs : var googlePlusOption

ASP.NET MVC - Populate SelectList with Font-Awesome Icons

I've populated List with font-awesome strings like: private static readonly List<string> Icons = new(){ "<i class=\"fas fa-users\"></i>",

ModelState.IsValid= False when upload image(bootstrap/Net core MVC)

I'm trying to upload an image, this is the view: @model CrearAmigoModelo @{ ViewBag.Title = "Nuevo amigo"; } <form asp-controller="Home" asp-action="Cr

How can I read in an edited textarea?

I'm trying to get the new textarea value to read into my controller so that way I can store the new value in my SQl database. View: @{ ViewBag.Title = "TRIO

.NET Core 3.1 Writing file to network drive

I am trying to get user to upload a document from the web interface and have it stored on the network share *\dfsms\shared\MyProject* , it also saves the entry

How to Secure Cookie in MVC

I have an application in MVC which is consuming some third party APIs. While running application on server I am getting below 4 cookies in browser and one of th

ILoggerProvider with generic types

colleagues! Im trying to create app with Onion arch and several GUI. I used lib Log4net as my log provider. I created my own IMyLoger interface at application l

Trying to Edit and Continue on a cshtml file is always throwing an exception

When I make any change to a CSHTML file while debugging then reload the page, I get this exception. This used to work, and I'm not aware of any changes that cou

Azure AD login automatically for a specific user

I'm in the process of migrating an ASP.Net MVC app from windows authentication to Azure AD Authentication. One of the requirements of the app is that some parts

Duplicate keystrokes on cshtml editor

I'm having a strange problem in Visual Studio 2022, and would like to know if someone else faced it. It only happens when editting .cshtml files, on Asp.net MVC

Visual Studio 2022 MVC Object Reference Error with @Script.Render(~/bundles/bootstrap)

I'm a beginner college student working on a group project in MVC. Things had been going relatively well until our most recent code update. When testing the app

Why does select2 return null?

I have a class "MetaKeyword" and an a class "Article", which has a List MetaKeywords atributes. These metakeywords are stored in db and users select them for th

Fetch Products from database with category and subcategory attached

I am building a web api and want to fetch all the products from product table I have in my database and I also want to include the category and subcategory whic

ASP.NET MVC / Entity Framework - Controller generation is somehow using old properties

After adding and altering columns in the SQL database, I've refreshed the Entity Model (Entity Framework 6) and deleted all controllers and views, to generate t

How to convert seconds to minutes in MVC?

I get the input as a second from the user and I want to show it as minutes and second in the Grid. I know I have to use a method but I don't know how. **Seizure

Consume SSL Secured APIs in ASP.NET Core 6 MVC Client

We have an application that has two projects as follows (1) AppClient – This dotnet core MVC project and it is running on WebServer on IIS (2) AppService

What to return after Ajax call asp.net

After ajax call is completed and the model is posted successfully to the controller, what should the controller return? In my case, I just want to add an item t

How to automatically add a name from selected id in View page from controller ASP.NET MVC

I want to get a name from selected id in my view page First Model public class Transaction { [Key] public int Id { get; set; } [Required] public

How we can call python POST request API from JQuery Ajax It showing CORS policy error

I have python API which is POST request, http://192.168.2.25:8059/calculation In Postman it return response like (Expected output should be same as like below)