Quantcast
Channel: Active questions tagged asp.net-mvc - Stack Overflow
Browsing index pages (4581 articles)

How to use list data in .cshtml file without using Model

This question might be very basic but i'm very new to C#.I am returning list data from controller without using model. I want to use this and want to create a table. // Mycontroller public ActionResult...

View Article


visual studio unable to start program access is denied

I'm getting "Unable to start program http://localhost:[port] Access is denied." when I try to debug an ASP.NET MVC app. Here are some more details, some of which may not be relevant.This is happening...

View Article


How to only add entities that are not already tracked by the context?

Application Feature: Admin can load data from excel file, which will be stored in the database, initially, the database contains no data.when Admin imports the data, it will be represented as objects,...

View Article

Populate a select list ASP.NET Core MVC

I'm busy with an ASP.NET Core MVC application, and I'm trying to populate a drop down list. I've created a view model and I have added a method to my StoresController that returns a list of stores that...

View Article

Read excel file data in MVC

I've did some searching, but haven't really found any good guides on how to do this.I want to be able to upload an excel file, but I don't want to store it on the server. I want to read it from the...

View Article


Binding Multiple Parameters in an HTTP POST Request in ASP.NET Core .NET 6

I'm encountering a challenge while migrating from ASP.NET MVC "classic" to ASP.NET Core with .NET 6.In the past (ASP.NET MVC 4, ... 5), I could easily handle multiple parameters in an HTTP POST...

View Article

What is the difference between MiniProfiler's request duration and action...

My application has action method inside a controller called Admin, which attempts to read the provided file, and write it's content to some destination, like a database.To measure the execution time,...

View Article

MultiTenant Application Prevent Tenant Access Data from Other Tenant in...

I’m working on a tenant application and I was wondering how I can block tenant access other tenant data.First, let me expose some facts:The app is not free, 100% for sure the malicious user is a...

View Article


How to manage transactions in the service layer?

We’re developing a .Net application with the following architecture: presentation layer (using MVC pattern with ASP.Net MVC 2), service layer, data access layer (using repository pattern over Entity...

View Article


How to call Vue components in my .cshtml pages?

I have a ASP.NET Core MVC project in conjunction with Vue.js. I am only using Vue.js to make my pages reactive. My goal is to create a main vue instance based on a div in the _layout.cshtml file and...

View Article

How can remove one row in table with ajax

In this partial view I fill a table with a model an foreach loop, like below:<table id="tblGroup" class="table table-bordered"><thead style="background: #eeeeee;"><tr><th...

View Article

Correct way to pass base64 info in URL as query string?

I am sending some parameters in query string by converting them in base64 using method btoa(). I just want to know, do I still need to wrap the result into the encodeURI method to pass on the correct...

View Article

How to call jQuery popup window with a partial view in it?

in my MVC web apps, I need to create a popup window with a Partial view (contains webgrid) in it, The problem is the partial view data did not show on the dialogbox, I only see the title. it seems I...

View Article


Is ok to deactivate a user account using GET http verb?

I'm stuck with a simple but tricky task that I'm developing on ASP.NET MVC 5 web app.I have a UserManager view which I need to add a button to deactivate the account of the current logged user. So I...

View Article

Image may be NSFW.
Clik here to view.

Non-identification the class of products in the program code

I am using EF and I created a products table in my ASP.NET Core5 project. When I want to use the Product Class in the program code, it does not recognize this classwhen I want to use Product Class In...

View Article


Display Last Sql Record in MVC Core 3.1

i am new with MVC Core, i working on news website Project, how i can display last SQL record on my index?please describe in details, what should i write in controller and razor page ?thank you

View Article

Visual Studio create new custom Scaffold Item for Razor WebApp

Summary:I want to create a new scaffold item for Visual Studio in my Razor app so that I do not have to edit every CRUD page to use my custom libraries. I have spent the last 2 days letting ChatGPT...

View Article


System.FormatException: Input string was not in a correct format. MVC5

Here is my code:string idString = System.Web.HttpContext.Current.User.Identity.Name; int customerID = int.Parse(idString);Customer customer = db.Customers.SingleOrDefault(c => c.CustomerID ==...

View Article

How to use a @Html.DropDownList with ViewBag?

I'm working with MVC4.I've added the paging, sorting and filtering functions in an Index page.As a result, I have to add a viewbag parameter to the filtering DropdownList to keep the filtering...

View Article

MVC Foreign key change to data

Have database and I want show not my player BasketballClubId, but I want to show ClubName.For example I have View like thisenter image description hereBut I want to show like this:enter image...

View Article
Browsing index pages (4581 articles)


Latest Images