Data dodania Pytanie
2017-01-11 23:01 Unique id for each control in table »
I have a table which contains a single input control for each item in my model. For this example let's assume my model contains 3 items. I am able t...
(1) odpowiedzi
2017-01-11 18:01 DataAnnotations range in View number helper »
I'm using Entity Framework with Data Annotations, in my Model (myModel.cs) i have this field: [DisplayName("My object")] [Required] [Rang...
(1) odpowiedzi
2017-01-11 15:01 Asp.net MVC Razor: Passing Complex model data »
I have two classes: public class Sportevent { public int ID { get; set; } public DateTime EventsStart { get; set; } public DateTime Event...
(2) odpowiedzi
2017-01-10 12:01 Using Sections from Layout page - not getting displayed »
I have defined a Section in my _Layout.cshtml page. @RenderSection("xx", false) Thereafter, I am trying to display this section on Create.cshtml. T...
(0) odpowiedzi
2017-01-10 12:01 How to abort build when compilation of razor views fails? »
I need to validate razor views during application build, so I used the tool described in the following article: http://dotnetthoughts.net/compile-your...
(1) odpowiedzi
2017-01-10 00:01 Rendering HTML content with @Html.Raw in Razor Mail Template »
Using Razor page as Mail Template I am trying to display the content of the mail (Html Content) using @Html.Raw(Model.Content). Anytime I run the cod...
(1) odpowiedzi
2017-01-09 15:01 C#- ASP.NET ViewModel have null reference but have values »
I have a problem with render View with Razor. I have a interesting warnings : An exception of type 'System.NullReferenceException' occurred in Ap...
(1) odpowiedzi
2017-01-09 13:01 Link to related data in Group Header Razor View »
Hi I have the following list view grouped by a Name so that I can display that name in the group header. I want to be able to put a link next to the ...
(0) odpowiedzi
2017-01-09 10:01 Sonar analysis of Razor .cshtml files »
Is there any way to analysis Razor .cshtml files that are largely made of just html? I have many pages which are just vanilla html but have the file ...
(0) odpowiedzi
2017-01-08 15:01 Add Google Chart API to non MVC Razor project »
I have been searching for days and its driving me crazy! Does anyone know about a tutorial or thread where it shows how to implement google charts API...
(0) odpowiedzi
2017-01-08 15:01 Model emptied after returning view »
I'm new to ASP and programing in general, so I'm probably doing something fundamentally wrong but here it goes: Everytime I return a View in my contro...
(2) odpowiedzi
2017-01-08 10:01 How to render Html.BeginForm output unescaped »
Antalis RazorEngine is used in MVC4 application to inject markup into Razor View. Output from @Html.BeginForm("UploadDocument", "Detail", new{a=1,b=...
(0) odpowiedzi
2017-01-07 23:01 DI Interfaces and Derived Class usage in Razor View (non-static classes) »
I'm building an MVC App, and I have an interface, and a derived class implementing the interface, and DI linking the two together. The functionality i...
(1) odpowiedzi
2017-01-07 19:01 Razor not render my data »
Following code will never be render on my page (ViewData["ERRORS"] is not empty), I don't know why... @section scripts{ <script> $(...
(0) odpowiedzi
2017-01-07 17:01 ASP.net webgrid loses jquery hover after sort »
I have a WebGrid object, using Razor C WebPages, that when sorted loses the jquery toggleClass declaration. Here is some sample js code to help. func...
(1) odpowiedzi
2017-01-06 21:01 How to get properties of items in IEnumerable<T> when that IEnumerable is in a model »
I have the following model which has an IEnumerable where T is another object/model: public class Employee { public ApplicationUser PayrollAdmin...
(2) odpowiedzi
2017-01-06 18:01 ActionLink helper in MVC navigates after second click »
I have a home page with different links inside, once I click in one of them, stay on the same page, the second click performs the redirect, why? My H...
(1) odpowiedzi
2017-01-06 01:01 Passing views with ASP.NET core & Razor »
I'm new to trying out MVC and Razor. Currently using Visual Studio for Mac preview to develop a website to try out the technology. My biggest concer...
(2) odpowiedzi
2017-01-05 17:01 Select option from DropDown and automaticly set value in another TextField ASP .NET MVC »
I would like to choose an option from the dropdown menu and based on the selected option automaticly set the value in the second input field. Like th...
(3) odpowiedzi
2017-01-05 08:01 Add row dynamically and pass the value to controller »
Scenario : Initially my form has no rows. When I click add button a new row is created and I enter details in it. If I want another row, I click add b...
(1) odpowiedzi
2017-01-05 01:01 Set text inside @html.Textareafor »
I am using asp.net core razor engine. I am trying to set text inside of my text area. I looked on stack and followed previous answers, but nothing s...
(2) odpowiedzi
2017-01-04 17:01 Summing values of two textboxes in Asp.net MVC »
Im new to ASP .NET MVC Web Aplications and i please need some help. I need to summ two values ("Cena" and "Kolicina") and save into textbox "Znesek". ...
(1) odpowiedzi
2017-01-04 16:01 Compiler Error Message: CS0246: The type or namespace name could not be found, class becomes lowercase »
I have a razor view: @model IEnumerable<MySpace.Data.DataProviders.Model> ... @{ int[] checkedRecords = (int[])ViewData["checkedRecords"]...
(0) odpowiedzi
2017-01-04 14:01 Compile razor views for middlewares in Microsoft.AspNetCore.Diagnostics netstandard library »
I am trying to edit some parts of Microsoft.AspNetCore.Diagnostics library But I cannot edit razor files like CompilationErrorPage.cshtml Even after...
(0) odpowiedzi
2017-01-03 23:01 How to format dates in MVC 5 Razor »
I have a table in my razor code that loops through all of the items in the model and creates a table row for each item. I'm trying to figure out how t...
(2) odpowiedzi
2017-01-03 15:01 Cookies created by Javascript not seen by C# (ASP.NET Razor) »
I'm setting a cookie in Javascript: document.cookie = "lang=" + lang + ";path=/;domain=" + window.location.hostname + ";"; If I check the cookies i...
(1) odpowiedzi
2017-01-03 11:01 MVC 5 Delete Action in Details Page »
In this MVC5 project, I want my Details page to also serve as Edit page and Delete page. I'm tackling this task by creating 2 forms, one with everyth...
(1) odpowiedzi
2017-01-02 19:01 How can I write a line for all my views using their view model? »
I am using the following line at the beginning of all my views: <script> var viewModel = @Html.Raw(JsonConvert.SerializeObject(Model)); </sc...
(1) odpowiedzi
2017-01-02 12:01 Date picker in razor view with restriction »
Hello supposing i have a model with a field like this: (mvc5) [DataType(DataType.Date)] [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyForm...
(2) odpowiedzi
2017-01-02 01:01 How can I relocate my MVC6 folders to another folder and still have them work »
I'm using MVC6, and I can't figure out how to relocate these folders in my project: MyWebApp Controllers ViewModels Views I...
(1) odpowiedzi
2016-12-31 18:12 Javascript Document.getElementById returning null »
I'm new to MVC and AJAX so this is probably a simple mistake I am making but using the code below, I am getting the following error trying to getEleme...
(1) odpowiedzi
2016-12-30 18:12 TinyMCE in ASP.NET MVC 5 Razor »
I'm trying to use TinyMCE with ASP.NET MVC 5, however, it does not seem to work. The textarea appears, but it's a regular textarea, not enriched with ...
(1) odpowiedzi
2016-12-30 15:12 Setting Min-Date for DateTime picker »
I am using the Bootstrap 3 Datepicker, specifically the No Icon (input field only) version. I am trying to use the minDate function so that the user ...
(1) odpowiedzi
2016-12-30 00:12 Why Javascript $(document.body) does not load outside of the source file? »
First of, a quick word about my setup. I have a global JS file common.js, where I store all commonly used functions. This file is bundled and set to ...
(1) odpowiedzi
2016-12-29 22:12 Including all file matching regex razor cshtml »
I want to include Angular2 build files in a CSHTML file. Currently, my include is: @section scripts { <script src="~/dist/main.js" asp-appen...
(1) odpowiedzi