Data dodania Pytanie
2017-12-09 06:12 Asp.net MVC Razor not encoding html »
My understanding is that the Razor markup will encode html strings, but I tried testing it out with following code in MVC view and it did not encode t...
(1) odpowiedzi
2017-12-08 21:12 Chrome loading scripts out of order »
I have simple MVC test application with _Layout and noticed that loading order of scripts is wrong in chrome. See pictures. In Layout.cshtml RenderB...
(0) odpowiedzi
2017-12-08 17:12 How to pass runtime parameter to ViewComponent Invoke method »
I am trying out the .net Core ViewComponents instead of partial views. Here is my scenario. I have a View that contains a few kendo listbox controls....
(1) odpowiedzi
2017-12-08 12:12 How to access JS variable of one razor page in other razor page? »
How do i access variable "DataToBind" of One.cshtml page in Two.cshtml page? One.cshtml <script> var DataToBind; $.ajax({ url...
(1) odpowiedzi
2017-12-08 10:12 Intermittent issue of HttpAntiForgeryException on Production only »
I am getting AntiForgery error on Production server intermittently. Details:- Issue occurred on login page only, After reload it works Issue is int...
(1) odpowiedzi
2017-12-07 20:12 Dynamically push data to a razor view in MVC Core while the controller is still processing »
I am trying to create a razor view in MVC Core that will display a status message that will be dynamically updated while a process on the server side ...
(0) odpowiedzi
2017-12-07 18:12 How to format Date, Time, Number in ASP.NET Core 2.0, RAZOR Tag Helpers »
I'm facing problems trying to format DateTime and Numbers in ASP.NET MVC Core 2.0 App using Razor Tag Helpers. Following the good practices I would l...
(0) odpowiedzi
2017-12-07 15:12 Core 2 MVC with JQuery Datatables »
There is a good example on how to use JQuery Datatables with Core MVC at Using jQuery DataTables Grid With ASP.NET CORE MVC I download the sample pro...
(1) odpowiedzi
2017-12-07 10:12 Double login to MVC and WebAPI »
I develop two separated applications: MVC and WebAPI. On some pages of MVC application I perform ajax requests to WebAPI. Furthermore, I use IdentityS...
(1) odpowiedzi
2017-12-06 20:12 ASP.NET MVC Scaffolding View - Missing Model Property »
This is my first time with MVC so please excuse me if I am getting the terminology wrong. I am working on a PluralSight course. My understanding is ...
(1) odpowiedzi
2017-12-05 21:12 Selected property on SelectListItem not being set by SelectList constructor »
I'm creating a SelectList to pass to a Html.DropDownList, but the correct value doesn't seem to be populating var x = new SelectList(new[] { new...
(1) odpowiedzi
2017-12-05 19:12 Changing mvc form controller on submit »
I recently came upon this question as I have a solution I need to work on. I have a controller which does some logic, with some method: public Co...
(2) odpowiedzi
2017-12-05 14:12 Merging a common project with build variations in .NET MVC »
I have a .net mvc site that should be published to a lot of different customers, and thus vary slightly depending on the target. Is there any way to ...
(4) odpowiedzi
2017-12-04 16:12 MVC Custom http headers set in web config but not all calls having them set »
I have the following tags set in my MVC web application. <system.webServer> <httpProtocol> <customHeaders> <remove ...
(0) odpowiedzi
2017-12-04 15:12 Call a controller method in a view »
I've got an asp.net core application in Visual studio. In a auto-created view (Events/index.cshtml) I want to call this method from the EventsControll...
(2) odpowiedzi
2017-12-04 15:12 Adding a dropdown list outside or RenderBody call »
I have a .NET MVC project with Razor views and I would like to implement search functionality that consists of a dropdown list, a text box and a searc...
(1) odpowiedzi
2017-12-04 13:12 ListBoxFor is case insensitive »
In select I have 2 options with same text, but different case: test and TEST as example. From server I receive only one selected item test. But on UI...
(1) odpowiedzi
2017-12-03 07:12 Unable to bind jQuery DataTable in AJAX call with JSON data »
I'm trying to bind jQuery DataTable by calling mvc action method using AJAX call and trying to populate the table using JSON data but it gets stuck on...
(3) odpowiedzi
2017-12-02 18:12 DisplayFor helper does not populate records from database in delete view »
i want to delete a record from my database , but in the delete confirm view the DisplayFor Helper Does Not Show any record from my database DisplayN...
(1) odpowiedzi
2017-12-02 18:12 @Html.Raw - Line breaks missing when assigning to json object »
I have the following code: data: { comment: { 'id': @Model.Id, 'description': "@Html.Raw(Model.Descripti...
(2) odpowiedzi
2017-12-01 21:12 The same site on two servers takes drastically different times to compile Razor? »
I have an Octopus deployed Umbraco site which can take a very long time to respond when deployed to QA, but responds very quickly when deploying to UA...
(0) odpowiedzi
2017-12-01 18:12 Can I use Javascript (with @ syntax) from partial into the main view? »
Apologies if I'm using the wrong terminology, I'm fairly new to this technology. I have a view which we'll call MainView.cshtml: <div> @Rend...
(2) odpowiedzi
2017-11-30 23:11 How to render sections in using razor MVC view »
I have a basic web site which is mixing cshtml content (note this is not an MVC site just a website serving up cshtml files) and angularJs. Default.cs...
(0) odpowiedzi
2017-11-30 05:11 Could not load type mvc c# »
Has anyone experienced an issue which the view could not load a type from the assembly since you've moved the type to a different namespace on the sam...
(0) odpowiedzi
2017-11-29 21:11 Minify razor html pages with nuglify or Web Optimizer? »
I'm trying out ASP.NET Core Web Optimizer which uses NUglify under the hood. It works perfectly for js and css and apparently has support for html as ...
(0) odpowiedzi
2017-11-29 19:11 Adding dependency as DLL or adding as a project »
We have an application written in asp.net mvc. Now we have written common db context & entities module (2 projects/class library) which are requ...
(3) odpowiedzi
2017-11-29 19:11 Why does ASP.NET Core ignore asp-action helper tag? »
I'm getting unexpected behavior in a Core 2.0 MVC app. Check this out: I have a controller "ProfileController.cs" with simple methods: public async ...
(1) odpowiedzi
2017-11-29 18:11 Pass raw html for button into column of jquery datatable from controller »
I have a controller that returns a generic DataTable to a View. I want to display this table as a jquery datatable. One of the columns has an html b...
(1) odpowiedzi
2017-11-28 16:11 How to prevent ViewData content encoding in ASP.Net Core Razor? »
This is fragment from View file: @{ ViewData["Title"] = "qwerty **Николай**"; } <div class="row"> <div class="grid-x grid-padding...
(1) odpowiedzi
2017-11-28 16:11 Date is empty in view textboxfor when adding type "date" »
Weird problem that is probably very obvious. In my view model I have a date, which I set in the controller. When I render the textbox in the view, it ...
(2) odpowiedzi
2017-11-28 16:11 Unity exception interception - configuration »
I would like to have one set of interceptors at the MVC or Web API layer that catch any exception, grab the URI that generated the exception, and look...
(1) odpowiedzi
2017-11-27 23:11 ValidateAntiForgeryToken workaround »
I'm creating an aws lambda which needs to call the login api in my main application. The problem I'm having arises when the lambda tries to call my l...
(0) odpowiedzi
2017-11-27 11:11 How to take only ONE image from a <<Collection>> of Images which is nested inside a <<Model>> »
Given following is the "Property" Model class where it consists of the Collection of PropertyImages as an attribute :- public class Property { ...
(0) odpowiedzi
2017-11-26 15:11 Razor views, displaying a property linked by a foreign key »
I have two classes Address and State (with corresponding tables in my database). State has two properties: Id and Name Address has (amongst others) ...
(1) odpowiedzi
2017-11-25 19:11 Intellisense missing for if, foreach, etc in Razor views Asp.Net Core »
Why isn't if, or foreach in the list? How do you make this work? ...
(0) odpowiedzi