Skip to main content

All Questions

Tagged with
0 votes
0 answers
35 views

Issue with RadioButtonFor in Index.cshtml - ASP.NET MVC 5

In my Index.cshtml in ASP.NET MVC 5, I have the following code and it works fine. <div>@Html.DisplayNameFor(model => model.IsEnrolled) Enrolled </div> But, if I replace the same code ...
khurj's user avatar
  • 17
0 votes
2 answers
38 views

ASP.NET MVC5: Change Upload Limit for Specific URL

I have a partial View page (ManageFile.cshtml) which is being used to upload and download files based on the current page and id. Since this View is partial, I am able to utilize it throughout my ...
Andrew C's user avatar
0 votes
0 answers
39 views

ASP.NET MVC 5 : render partial view blocking the navigation

I am having a real headache issue that would like to see if anyone have any insights. I'm using ASP.NET MVC 5 and C# and I'm trying to render a partial view inside a view. The code to generate the ...
Thiều Quang Cường's user avatar
1 vote
1 answer
16 views

MVC5 Validator Error With Date and DateTime in same page

I have a date and a datetime field in my model : [Display(Name = "Tanggal")] [Required(ErrorMessage = "Tanggal harus diisi.")] [DataType(DataType.Date)] [DisplayFormat(...
Jun Rikson's user avatar
  • 1,982
0 votes
2 answers
74 views

How to disable a textbox while when we hit edit option in edit.cshtml page in mvc?

====> Here is my edit.cshtml page code: <div class="form-group"> @Html.LabelFor(model => model.Eno, htmlAttributes: new { @class = "control-label col-md-2&...
Nani's user avatar
  • 9
0 votes
0 answers
37 views

Bootstrap 3 for Razor Html Action List

I made a list with the following MVC5 C# code to create the menu public ActionResult List() { List<Menu> entity = _menuService.List(); List<MenuModel> model ...
Unknown's user avatar
0 votes
1 answer
331 views

How to pass a list of data from one partial view to another partial view, when both partial views are contained in a same parent view in ASP.NET MVC?

I have 2 partial views, HeadphonesFilters and HeadphonesList which are both contained inside an Index view which is as follows: <div class="container"> <div class="row"...
Chaitanya Bathia's user avatar
0 votes
1 answer
159 views

Bind <string, string> Dictionary to Checkbox MVC (Make checkbox return srtring value)

I got this structure in my ViewModel public Dictionary<string, string> Answers { get; set; } public List<KeyValuePair<Question, List<string>>> QuestionsAndOptions { get; set; ...
pyrokinesis's user avatar
1 vote
0 answers
2k views

How to redirect to custom 403 using Middleware - asp.net

I'm trying to redirect if authentication fails to a custom 403 page which Is not working. The web pages should only be accessible if the user is authenticated via LDAP(should belong to a particular ...
melspring's user avatar
  • 121
0 votes
1 answer
537 views

c# MVC5 @Html.EditorFor datepicker never displays the value

Sorry to bother but I've been headbanging on this topic for 8 hours tried all the suggested solutions here and there and nothing changes (in good). If someone could help... pleaaaase ... I have a view ...
RaphKa's user avatar
  • 1
0 votes
1 answer
256 views

How to access a variable that is inside a foreach statement who is inside an if statement in razor syntax C#

In a view in MVC C#, I have a variable called items that is inside a foreach statement, but that foreach statement is inside an if statement. I want to be able to grab the value of that variable ...
CodeQuest's user avatar
  • 123
0 votes
0 answers
91 views

ParserError when returning PartialView from MVC controller route with Bound Prefix

First time posting here, but I have exhausted every google permutation I can think of. Unfortunately, I am working with a view that needs to have multiple partial views loaded at the same time, that ...
Trenton Blackburn's user avatar
0 votes
1 answer
594 views

MVC Enums and Models in one View - Error: "is a type, which is not valid in the given context"

I'm trying to use the model getting passed in the controller and an Enum in my view. I keep getting an error that the type is not valid in the given context. I am trying to use an extension method to ...
JEuvin's user avatar
  • 985
0 votes
0 answers
598 views

Visual Studio 2019 not publishing CSHTML files

I upgraded an MVC5 project a while ago from VS 2013 to VS 2019. But one (maybe more) of my .cshtml files isn't publishing to the web server. The file (if relevant) is called: _MainMenuPartial.cshtml ...
Captain_Planet's user avatar
0 votes
0 answers
407 views

Why I get null value in input file when return model to view?

Why I get null value in input file when return model to view? this my model: public class BookViewModel { public string Author{ get; set; } public HttpPostedFileBase Book { get; set; } } this ...
Ahmed Saif's user avatar

15 30 50 per page
1
2 3 4 5
82