Data dodania Pytanie
2017-01-21 22:01 There is no ViewData item of type 'IEnumerable<SelectListItem>' that has the key “Geslacht” »
First of all, I'm a beginner in what concerns C#, Razor, ASP.NET... I want to make a 'DropDownListFor' for the genders with a 'List' but the problem i...
(3) odpowiedzi
2017-01-21 20:01 ASP.NET MVC Passing a List of Lists to the ViewBag »
I have an Entity with a definition of: public class Skill { public enum Level { Begginer, Intermediate, Advanced } public int Id { get; set;...
(1) odpowiedzi
2017-01-21 15:01 Calling a Controller Method with parameters from a View when a button is clicked (cshtml, c#, MVC) »
This is my Controller, where I would like to call the method AnswerASelect. namespace VotingWebApp.Controllers { public class HomeController : Con...
(0) odpowiedzi
2017-01-20 17:01 Given razor file, how do I differentiate whether it is a view or a partial view? »
When I add a new ActionResult in controller like this public ActionResult Step8(AddPropertyStep7ViewModel model) { return View()...
(2) odpowiedzi
2017-01-20 16:01 Using function from user control (razor syntax) »
Hey guys I am stuck for a week for trying acces a function made in user control. I use razor syntax (webmatrix) I have 2 ascx files hoop.ascx: <...
(1) odpowiedzi
2017-01-20 10:01 Why we need to use @using with Html.BeginForm »
Can someone explain to me why we need to use @using (Html.BeginForm("CheckUser", "Home", FormMethod.Post)) Instead of : @Html.BeginForm("CheckUs...
(3) odpowiedzi
2017-01-19 12:01 Razor Chart Helper: How to change AxisX text orientation »
In a view, I can not change the orientation of the text of the labels of the X axis I tried to add a property in a theme but this does not seem to wor...
(1) odpowiedzi
2017-01-19 11:01 Changing parts of view dynamically based on controller response »
I'm looking for best approach suggestions for the below scenario: A user can choose one or more csv files to validate(Attachment 1) which on "valida...
(1) odpowiedzi
2017-01-19 09:01 Make Foreach loop run untill it finds results »
for (int i = 1; i < 31; i++) { var getData = "SELECT * FROM Test WHERE date = '" + inputDate + "'"; sumKG = 0; foreach (var c in db.Qu...
(2) odpowiedzi
2017-01-18 19:01 Are Razor templates rendered asynchronously? »
I'm trying to understand if a .cshtml file that is parsed with the Razor view engine is running async? That is, if I do some long computation in code...
(1) odpowiedzi
2017-01-18 10:01 How can i hit the controller using Partial View form that have different form type(ajax and begin form) »
I have a main form which is rendering a div to a partial view. I loads the controlls very fine. On main form i have a controller which got a function ...
(1) odpowiedzi
2017-01-18 02:01 How to accomplish this nl to br functionality in ASP.NET Core MVC? »
In the past, in previous versions of MVC, in the need for one nl to br functionality in Razor Views, I used to implement the following nl to br HTML h...
(1) odpowiedzi
2017-01-17 15:01 Why am I unable to use a lambda expression in razor view when the class is a list? »
I want to display data in a TextBox in my view in MVC inside a foreach loop. Why can't I use a lambda expression when I can use a typical variable? He...
(1) odpowiedzi
2017-01-17 15:01 Redirect user authenticate form in action using a AJAX call »
I'm developing a .Net Web application using ASP MVC, jQuery & AJAX. I have a list of products, when I click on the detail button of a product , I'...
(1) odpowiedzi
2017-01-17 15:01 HttpUtility HtmlDecode. Why do i need this? »
I have an ASP.NET MVC controller that returns a view. In this view i create some html. For example @Html.ActionLink(HttpUtility.HtmlDecode("&iqu...
(2) odpowiedzi
2017-01-16 21:01 asp.net mvc : disable mvc form »
I have an application in which an user can edit a form. This is my code : Controller and ViewModel : public class HomeController : Controller { ...
(2) odpowiedzi
2017-01-16 13:01 MVC Razor View - Displaying Modified Date instead of Created Date if it is not empty »
In MVC Core View, I am trying to display the Date Modified instead of Date Created if it is not empty. So, I wrote like the following @Html.Display...
(1) odpowiedzi
2017-01-16 10:01 Unable to modify cshtml page in mvc »
There is a mvc application, in which I am trying to modify in pre-compiled CSHTML page(Index.cshtml) @using System.Web.Mvc.Html @model Services.Admin...
(1) odpowiedzi
2017-01-15 23:01 Create different classes in Foreach loop using MVC5 »
I am creating a carousel using jQuery and have found some very simple code to implement it if you are coding each image in individually, however I am ...
(3) odpowiedzi
2017-01-15 09:01 Change View layout in MVC Pluggable pattern dynamically »
Some explanation about scenario but please be patient to end!!! I have Implemented a pluggable MVC application which can register plugins which exist...
(0) odpowiedzi
2017-01-15 01:01 Partial view not displaying view-model when inside serialized Div »
I have a working partial view that is updated using Ajax Jquery. If I make a small required change the partial view no longer displays the returned v...
(0) odpowiedzi
2017-01-14 20:01 ASP.Net MVC How To switch URL Language after changing culture in the browser URL »
I have website with 2 languages (English and Arabic).Every language has different URL like that: /en/Account/Register in English language. /ar/ال
(0) odpowiedzi
2017-01-14 01:01 MVC Renders Razor template on normal page load but not when Angular ngRoute gets it as templateUrl »
I am using some 3rd party library that uses razor syntax to render the gui 'widget' that is used the client. It seems that this library creates some d...
(1) odpowiedzi
2017-01-13 23:01 How does one handle ' in user-supplied data in vue.js? »
So I have a block of user-supplied text I'm pulling in from a CMS. However, in that string is a simple ' which blows up the whole string and returns ...
(2) odpowiedzi
2017-01-13 16:01 Using Razor inside Javascript (not MVC) »
I'd like to know if in my case I can use razor inside javascript! <html> <head> <!--Load the AJAX API--> <script typ...
(1) odpowiedzi
2017-01-13 12:01 Update Product Table with subtable. Razor code and update code of controller is working fine but [HTTPPOST] code is not working, giving errors »
@foreach (var sprd in ViewBag.subProduct) { <div class="form-row control-group row-fluid"> ...
(0) odpowiedzi
2017-01-12 21:01 Render strings on a cshtml from a class with constants »
I have a public class like this: namespace MyProgram.Common { public static class UIStrings { public const string Title = "Hellow...
(2) odpowiedzi
2017-01-12 14:01 call property to populate in model »
Hey all new to the MVC world so I'm sure I am not doing something correct here. I am trying to call a function from the model page from my view index ...
(4) odpowiedzi
2017-01-12 12:01 Date difference in mvc view with current date / sql server »
I get date from my model and it is displayed in view @Html.DisplayFor(modelItem => item.UpdateDate) UpdateDate is datetime.(Format 2017-01-12 17...
(1) odpowiedzi
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