Tagged Questions
The ASP.NET MVC Framework is an open source web application framework and tooling that implements a version of the model-view-controller (MVC) pattern tailored towards web applications and built upon an ASP.NET technology foundation.
0
votes
0answers
13 views
How to create a dynamic checkboxlist group in C# MVC?
How do I create a dynamic checkboxlist groups in C# MVC Razor View as shown in the picture below.
Let say the group category is CO2 and there are sub-items below it which example shown test and test2....
0
votes
0answers
6 views
Working with Glass.Mapper.SC v4 and Sitecore 8.2
I've installed Glass.Mapper.Sc.Mvc-5 package
and then revised MVC model
[SitecoreType]
public class News
{
[SitecoreId]
public virtual Guid Id { get; set; }
[SitecoreField(FieldName =...
0
votes
0answers
10 views
Installing the correct DLLs to resolve ActionLink(…) and RouteLink(…) in a cshtml view
I'm having an extremely hard time to get @Html.ActionLink(...) and/or @Html.RouteLink(...) to be resolved in my cshtml view, which should become part of an MVC5 AngularJS webapplication. I didn't ...
-2
votes
0answers
5 views
Role Based Access Control (RBAC) class design
I was trying to create a Role Based Access Control and with some google search I found the solution to create User table, Role Table ,User Role table , Permission table and Role Permission table. But ...
0
votes
0answers
4 views
Seed data in code first entity framework
I am using codefirst entity framework in my MVC project
I have tables
User
public class User:IBaseEntity
{
public User()
{
UserRoles = new List<UserRole>();
}
public ...
0
votes
1answer
19 views
MVC Save multiple keywords from Texbox into database
I have a Texbox where I get multiple keywords with an autocomplete jQuery script from database. How do I send data to the controller when my Textbox is like this: @Html.TextBox("search") and I also ...
0
votes
0answers
7 views
Type fails to serialize the response
I'm using Visual Studio 2015 to create an Asp.Net web API.
Every time I try to obtain data from POI, using the following link http://localhost:62809/api/POIs/1, I'm able to return all the ...
1
vote
2answers
15 views
Ajax.ActionLink takes to a different Page MVC 4.5 Visual studio 2015
i checked all possible stackoverflow and asp.net questions about this subject and couldnt solve my problem.
As the title says my Ajax.ActionLink Redirects to a new page instead of replacing the div i ...
0
votes
0answers
12 views
How do I Upload A file to the filesystem with a partial view and the reload unobtrusively that partial view?
I have this partial view
<label for="Content">Soporte</label>
<div id="Content">
@if (Model.DocumentId == null)
{
<form action=...
0
votes
0answers
9 views
Whenever I enable a service bus backplane in my application SignalR stops working
Whenever I enable a service bus backplane in my application SignalR stops working.
GlobalHost.DependencyResolver.UseServiceBus(new ServiceBusScaleoutConfiguration(System.Configuration....
0
votes
0answers
11 views
How to show partial view in datatable child?
I am using the jQuery plugin called datatables. I was trying to use child() to display the contents of a MVC partial view, but it doesn't seem to work.
Here's the link to the child() documentation: ...
1
vote
0answers
18 views
I am getting a Null exception when use ModelState.AddModelError [duplicate]
I am using ModelState.AddModelError in MVC to show error messages in view. I have this code:
[HttpPost]
[Route("resetpassword")]
public ActionResult ResetPassword(ResetPasswordView ...
0
votes
0answers
10 views
User Not Found While Changing Password
What is wrong with the following code that is causing it produce a "User Not Found" Error. The purpose of the code is to allow logged in users to change their passwords.
[Authorize]
public partial ...
0
votes
0answers
6 views
Azure Active Directory B2C - Query Graph - Insufficient Privileges
So I'm trying to connect an mvc app to AAD B2C, and retrieve the current users groups, so I can add them to their roles. Unfortunately, I am unable to successfully query the graph.
Insufficient ...
0
votes
1answer
14 views
Modal's partial view content does not refresh
I have a bootstrap modal which, when opened, hits the server to update the model with data that will be displayed to the screen. It works great the FIRST time the modal is opened, but after that, it ...
0
votes
1answer
10 views
Each validation summary linked to it's own partial view
I have a view that is composed from 2 partial view plus what is already in the page. I want each view to have a validation summary. Everything is working fine except that when there's an error in one ...
0
votes
0answers
12 views
MVC force logout if Session object is empty
I've been looking around and i can't find exactly what i want, or maybe it's more complex than i thought, that's why i'm asking.
Just like i see in my the _LoginPartial.cshtml :
@if (Request....
-1
votes
0answers
10 views
Seeking examples of registration validation of programs across the Internet
Current project:
ASP.NET 4.5.2
MVC 5
MS Access 2013/2016
So either my Google-Fu caught a bad case of the irrelevant returns, or I am just not putting in the right search terms.
Company I work for ...
0
votes
2answers
27 views
Filter a list in the view
I have a simple @foreach loop in a view that iterates over a list:
@foreach (var record in Model.ChangeOrder.Change_Order_Dash_List)
{
....
}
Works great! But, depending on a boolean in the ...
0
votes
0answers
12 views
Go To Controller shows “Unable to find a matching controller.” error
In VS 2015, for my Web.API project, I installed MVC 5 from nuget via npm.
This installation added references and generated web.config file under Views folder.
I added new Controller with generated ...
1
vote
3answers
30 views
ViewModel values empty on submit in controller
I Have two submits which should lead to different actions in controller but they arent passing any values. everything was working when there was one submit. Here is the view
@ViewBag.Title
<...
0
votes
0answers
11 views
Having Issue on Running Dojo AMD on ASP.Net MVC
I am trying to load some Dojo AMD Modules to ASP.Net MVC to Home contorller index() view as
@{
ViewBag.Title = "Home Page";
}
<script src="http://js.arcgis.com/3.18"></script>
<...
0
votes
0answers
18 views
The Role Manager feature has not been enabled.
i'am learning to build ASP.NET MVC4 apps, and when i try to add users to database with update-database i get: "The Role Manager feature has not been enabled."
I don't have any membership ...
0
votes
0answers
16 views
Value cannot be null. Parameter name: items error in MVC5
Value cannot be null. Parameter name: items
I have a partial view that contains dropdown list that takes values from a table called Months, this partial view used in view called PSR
I passed object ...
0
votes
0answers
14 views
Html.EditorFor bool data type [duplicate]
I have in my model bool field
and when I use @Html.EditorFor(model => model.Gender,)
it renders it as a checkbox
I want to render it as a 2 radio buttons
first one with 0 represents value for ...
0
votes
0answers
10 views
Kendo UI Grid - Image From Database
I am using Kendo UI grid in ASP.NET MVC project. I am stuck to show images from database in the column sections as follows:
var columnOptions = [
{
field:...
-2
votes
0answers
5 views
Microsoft.Dynamics.BusinessConnectorNet ERROR [on hold]
When i run .exe file of project i face this error.
An unhandled exception of type 'System.BadImageFormatException' occurred in Unknown Module.
Additional information: Could not load file or assembly '...
0
votes
0answers
7 views
WIF10201: No valid key mapping found for securityToken: 'System.IdentityModel.Tokens.X509SecurityToken' and issuer
I'm using identity server v3 and the cert expired on the server. I generated a new cert in IIS, installed it in the cert store (trusted people, personal) and set the thumbprint in identity server. I ...
0
votes
2answers
35 views
How to show a success message in ASP.Net
I am a beginner and learning ASP.Net MVC web development. I am stuck at one place.
I have a reset password window. If user successfully resets the password I want him to redirect to the same page ...
-1
votes
2answers
40 views
ASP.net Core: Is it normal to call method of different controller from view? [on hold]
I have 2 controllers: FirstController and SecondController.
First controller contains GET method GetFirstData for send some data.
Second controller contains similar method GetSecondData for send ...
0
votes
0answers
9 views
MVC pass model's property to partial view including ModelMetadata of this property
I have a ViewModel and I would like to pass its property to partial view including the property's metadata (HelptextAttribute in this particular case).
When I use the EditorFor method, everything ...
0
votes
0answers
23 views
ASP.NET and Visual Studio doesn't send scripts / style bundles
I keep having a re-occuring problem with my code in MVC where when my page loads and I right click to view source, it doesnt have any of my scripts or css in there.
In my .csHTML, it is listed as ...
0
votes
0answers
12 views
How do I have two collections of the same model share an inverse property in Entity Framework Code First?
Explanation
This is the code that I have on the Tooler model, with the new addition MaxValueLevels.
[InverseProperty("Tooler")]
public virtual ICollection<Level> Levels { get; set; }
...
-2
votes
0answers
13 views
ASP.NET MVC and the database it generates for a model class
I’ve done 2 essentially identical experimental projects in ASP.NET MVC, each in a separate solution and project. In both cases, I simply added one model class (each instance of which represents a ...
-2
votes
1answer
35 views
How can i dynamically add objects to a list of objects in a model? [on hold]
I'm writing an admin portal where you can create presentations and add pre-made slides to these presentations. Currently, you have to create your presentation and then navigate to a create view for ...
0
votes
0answers
11 views
asp mvc how to redirect random address to custom error page
I have problems with catching random address and redirecting it to a custom error page (404). For example: http:\\my.domain.com\fhdgfhdsagfsdalfkhd it's redirect to
I have done sections in web.config
...
0
votes
0answers
18 views
Is there an equivalent to routes.IgnoreRoute(…) in ASP.NET CORE?
In ASP.NET MVC 4, I could ignore certain routes by using:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{*old}", new {old=@"previous(/.*)?"});
}
.NET Core doesn'...
0
votes
1answer
18 views
Passing data to modal with $('#MyModal').modal('show');
Dygraphs is a plugin that allows you to easily turn json into charts in an HTML page. From with a dygraphs chart, I am able to annotate the chart, and the annotations can have a clickHandler event:
...
0
votes
1answer
17 views
How to change url as parameter will look like controller name in mvc
Currently the url in the address bar displays as
example.com/?City=Canada¶1=¶2=&....
Is it at all possible to make the url be:
example.com/Canada/?para1=¶2=&....
...
0
votes
1answer
10 views
MVC HTTP Error 403.14 - Forbidden after create new record
1- AuthorizeUserAttribute.cs is class for costume authorize attribute
public class AuthorizeUserAttribute : AuthorizeAttribute
{
public string AccessLevel { get; set; }
protected override bool ...
-1
votes
0answers
8 views
AJAX file upload - HttpPostedFileBase parameter always null MVC
I have problem with uploading file In Asp.net Mvc. First of all I should use Ajax to pass the upload file value.
Please can someone tell me where I am going wrong to resolve this.
my controller
{` ...
-3
votes
0answers
36 views
What awaits an async action method's return?
In ASP.NET MVC and Web API, an asynchronous action is a controller action method marked with the modifier async, e.g:
public async Task<ActionResult> Login(LoginViewModel model, string ...
0
votes
2answers
24 views
Upload file to a folder on other asp.net mvc website
I have two asp.net MVC websites. One the front end(mysite.com) and one the backend(admin.mysite.com).
They both use the same database and everything is working fine. But, I am facing the issue in ...
0
votes
0answers
25 views
Not able to fetch querystring value in MVC4 Action result
I am facing trouble passing values from JS to MVC actionresult.
Below is my JS code in which I want to populate JqGrid. During debugging the values of both the parameters are coming as null. I checked ...
0
votes
1answer
25 views
How can I add an app.config or web.config file in Visual Studio Web 2013?
This has been frustrating me for the past hour. My project is like
MySolution
MyTestProject
ClassThatTestsMyRepository.cs
MyMVCProject
App_Data
App_Start
Controllers
...
0
votes
1answer
9 views
Write HTML Text is not working after Ajax call
Please tell me why on earth the text "Result1" is not written to the html page even if the condition ViewBag.Publish != null.
What happens after ajax request so that the View is not updated ?
please ...
1
vote
0answers
39 views
MVC Missing Views
We have a legacy Web Forms application which we've recently converted from a website project to a web application project.
The Web Forms project is the "startup" project of the solution.
There is an ...
0
votes
0answers
5 views
Winnovative HTML to PDF close preview page after I press print button
I'm using Winnovative HTML to PDF .NET Library (paid version) with C# and MVC, .Net Framework 4.0. I like to show a HTML page, this page I being to converted to PDF, and when the DOM is loaded, I ...
0
votes
1answer
17 views
More than one Foreign Key to the same table?
I am trying to save a foreign key in 2 columns of a row. For some reason, this is acting wonky because some of the navigation properties are showing up as columns in my table... Here is the model. ...
-5
votes
0answers
46 views
Auto Refresh with C# MVC [on hold]
I have a project done when adding a product at the end of each row have an icon of the wastebasket and then to follow a total to the sum of the values of all the items, but when you click the icon ...

