Skip to main content
Filter by
Sorted by
Tagged with
Best practices
0 votes
2 replies
32 views

I come from a MVVM in WPF background moving towards ASP.NET MVC. I have a model that is composed of another model called Message, like so: public class User { public int Id { get; set; } [...
92carmnad's user avatar
  • 162
Advice
0 votes
2 replies
41 views

I have this scenario: I have an ASP.NET API which is deployed on IIS under the default web site. I have added the API by right click on default web site -> add application. API is working fine and ...
Midlaj's user avatar
  • 23
0 votes
0 answers
39 views

I am experiencing an issue when using Syncfusion PDF Viewer with PDF files after making edits using the Draw Ink tool or any other tools : I opened a PDF file using PDF Viewer. I added text using ...
shahad tariq's user avatar
0 votes
1 answer
86 views

I'm working on a messaging platform type sales platform. A buyer can contact a seller about a product. Their message concerns a specific product. The exchange of messages is only possible between a ...
AMP59's user avatar
  • 35
0 votes
0 answers
30 views

This only happened a few days ago and I usually keep on top of the updates in vs 2022. When making a change the the code behind for a razor partial view - hitting save would auto-build the changes and ...
tqrecords's user avatar
  • 541
1606 votes
48 answers
1.2m views

Every time a user posts something containing < or > in a page in my web application, I get this exception thrown. I don't want to go into the discussion about the smartness of throwing an ...
Radu094's user avatar
  • 28.6k
0 votes
0 answers
40 views

I'm currently working on migrating a project from .NET 4.5 to 8. One of the key functionalities of the old project is the ability to download a barcode of a given string: Old functionality public ...
DarkoPrime's user avatar
0 votes
0 answers
40 views

After several days and multiple attempts using examples, I am still struggling to get a partial view to page inside a tab control. In the code below, when selecting the 'tab4' Tab 1st time, it ...
PeteN's user avatar
  • 15
361 votes
73 answers
459k views

What I'm doing: Opening Visual Studio Community 2015 File -> New -> Project Under Visual C#: Web -> ASP.NET Web Application Web Application And press f5 for the popup error "unable to connect to web ...
Sarek's user avatar
  • 3,668
340 votes
27 answers
331k views

The project is an ASP.NET MVC Web App targeting the .NET Framework 4.6.1. All of a sudden (some NuGet packages were upgraded) I started to get the following error during runtime: CS0012: The type '...
empz's user avatar
  • 12k
547 votes
42 answers
198k views

My Tools: Visual Studio 2012 Ultimate + Update 1 ReSharper v7.1.25.234 My Solution Build Status: Build Successfully But when I install ReSharper and ReSharper code analysis is enable, many ...
Ramin Bateni Parvar's user avatar
1 vote
0 answers
56 views

I am trying to dockerize an existing ASP.NET MVC application running on .NET 4.5.2. I am using mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019 as the base image (the base ...
Ganesh Pg's user avatar
786 votes
36 answers
522k views

Is there some easy way to handle multiple submit buttons from the same form? For example: <% Html.BeginForm("MyAction", "MyController", FormMethod.Post); %> <input type="submit" value="Send" ...
Spoike's user avatar
  • 122k
604 votes
38 answers
2.3m views

I have a simple jquery click event <script type="text/javascript"> $(function() { $('#post').click(function() { alert("test"); }); }); &...
Paul Creasey's user avatar
  • 28.9k
1 vote
1 answer
43 views

I have an iframe embedded in an ASP.NET web form. I have included what I thought was the correct Content-Security-Policy values in the web.config. However, I still get a CSP violation in the web ...
Joel's user avatar
  • 141
0 votes
0 answers
62 views

I have an ASP.NET MVC application that is configured to use SQL Server to save the session state. If there is an issue with the session state connection string (invalid password, server, etc) my ...
Jim R's user avatar
  • 55
876 votes
23 answers
393k views

(Preface: this question is about ASP.NET MVC 3.0 which was released in 2011, it is not about ASP.NET Core 3.0 which was released in 2019) I want to upload file in asp.net mvc. How can I upload the ...
user637197's user avatar
  • 8,917
0 votes
1 answer
68 views

I have this validator class: using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Web; using DocumentFormat.OpenXml.Linq; using ...
Sally Parkes's user avatar
194 votes
60 answers
157k views

I have a test class and below I have posted a sample test from the test class namespace AdminPortal.Tests.Controller_Test.Customer { [TestClass] public class BusinessUnitControllerTests { ...
Cybercop's user avatar
  • 8,724
547 votes
22 answers
439k views

I want to get all the error messages out of the modelState without knowing the key values. Looping through to grab all the error messages that the ModelState contains. How can I do this?
chobo2's user avatar
  • 86.2k
1 vote
1 answer
67 views

I am using ASP.NET MVC. I have a PIF controller and on the details view, I have data showing from a variety of other models, one of which is called SAEs (I will use this as the example). For each of ...
Sally Parkes's user avatar
1089 votes
13 answers
646k views

In ASP.NET MVC, what is the difference between: Html.Partial and Html.RenderPartial Html.Action and Html.RenderAction
Ghooti Farangi's user avatar
0 votes
1 answer
36 views

This a continuation of this question: ASP.NET MVC Create View - Where to place ValidationMessage (Fluent Validation) for a variable ASP.NET MVC Firstly, all the validation rules are firing except the ...
Sally Parkes's user avatar
0 votes
1 answer
49 views

I am using ASP.NET MVC with a SQL database backend. I have a table that lists individuals which I use for two fields in another table. One field is for the Chief Investigator (ChiefInvestigatorID), ...
Sally Parkes's user avatar
253 votes
28 answers
239k views

After significant refactoring in my MVC 4 application, and Razor shows this error while debugging Views: The name 'model' does not exist in the current context. This is the offending line of code: @...
keeehlan's user avatar
  • 8,064

1
2 3 4 5
4016