Data dodania Pytanie
2017-07-21 23:07 I can't serve css files ASP MVC »
I'm using dotnetcore and ASP MVC. The problem is that I don't know how to serve correctly my css and images files. Here you can see the file structure...
(1) odpowiedzi
2017-07-21 21:07 Pass complex object from view to Controller »
I have this model: public class MyClassVM { public Product MyProduct { get; set; } public IEnumerable<Dog> MyDogs { get; set; } } Then I have...
(1) odpowiedzi
2017-07-21 11:07 Is it possible to get the value in a lambda in HTML and use it in a razor »
Is it possible to get the value in @Html.DisplayFor(modelItem => item.gender) and use a razor and do an if...then statement? The value of the i...
(1) odpowiedzi
2017-07-20 18:07 Why does my ASP Core MVC Razor form show input boxes without margins? »
I reviewed the boilerplate bootstrap, as follows: .form-control { display: block; width: 100%; height: 34px; padding: 6px 12px; font-size: ...
(1) odpowiedzi
2017-07-20 16:07 I've defined a section - now I want to remove it »
Hi I've created a site with some views, within those views I've created a section title @section title { My title. } On the layout page there i...
(2) odpowiedzi
2017-07-20 13:07 Linking between Views in bootstrap (MVC) »
i am working on my MVCOnlineShop Project , i have shown categories on homepage by creating a partial view CategoryLayout.cshtml : @model IEnumerable&...
(2) odpowiedzi
2017-07-19 16:07 How do I access my C# Array in my View? »
I have an array in my Controller that I'm passing over to my View, and (temporarily) I'm trying to console.log some of the values in the array (just t...
(3) odpowiedzi
2017-07-19 11:07 ASP.NET MVC5: Directly view the .cshtml file in browser »
I am new in ASP.NET MVC, I am trying to open Navbar.cshtml in browser directly. After a lots of efforts and seeing results I am not able to open it di...
(3) odpowiedzi
2017-07-19 02:07 Should I add a double quote to c# variable for adding a css class in razor? »
I want to conditionally display css class. I have a if statement like: @if(a > 5) { specialBackground = "background: green;"; } Then in my ht...
(1) odpowiedzi
2017-07-18 22:07 MVC Show Hide div based on Model property Metadata »
I want to show and hide a div tag based on an property on an model. So lets say i am returning Employee data. public class Employee { ...
(0) odpowiedzi
2017-07-18 09:07 How to pass element from model in ajax post request? »
First of all sorry for my English. I have no idea how to upload element from the model (var nameData in )using AJAX . I asked for a hint, here is th...
(5) odpowiedzi
2017-07-18 03:07 How to I get a FriendlyURL in Razor? »
Anyone know how I can turn the URL from: www.contoso.com/locations?Country=Vietnam into www.contoso.com/Vietnam in Razor, C#, Webforms. (I'm using W...
(1) odpowiedzi
2017-07-17 22:07 Server side fix for widows in text string »
I'm having an issue with server side widows fix. I'm able to fix widows/orphans with client side javascript. However I would prefer to do it server ...
(1) odpowiedzi
2017-07-17 22:07 Render template from string to string .net core without view »
I need render a template from string in .net core, without a view file. My application is a console application. In .net Framework RazorEngine.Templ...
(0) odpowiedzi
2017-07-17 00:07 How to add file attachment to Email message sent from Razor page (with ASP.NET Core and MailKit) »
The following is a method for sending an Email from a Razor page in ASP.NET Core. I need to use MailKit since System.Net.Mail is not available in ASP....
(1) odpowiedzi
2017-07-16 17:07 Setting Cookies not working for ASP.NET MVC5 Razor View web application »
I am setting cookies in my controller public void setCookie() { Response.AddHeader("Set-Cookie", "CookieName=CookieValue; path=/;"); ...
(0) odpowiedzi
2017-07-16 16:07 ASP.NET Core MVC view displaying incorrect values from input in list »
I'm building a quotation form in ASP.NET Core MVC Web App. I've got a QuoteVM that contains required properties for the quote plus a List QuoteItems t...
(1) odpowiedzi
2017-07-15 20:07 How To Find Id From Anchor Tag Using Jquery »
Here i am trying to find the taskid present in anchor tag using Jquery on click of that anchor tag having class=POtskComment.But as i click the anchor...
(3) odpowiedzi
2017-07-15 04:07 Id of a model is not passed from the view to the action correctly in ASP MVC when Editing a list of models »
I'm passing a list of objects to a view and allow the user to update a property of a single object. This is the get action. I'm passing a list of Ar...
(1) odpowiedzi
2017-07-14 17:07 Global / local scoping in Razor MVC »
I've recently started delving into MVC Razor web programming, and I'm pretty much stuck with some basics. I have this code: @ { using WebMatrix.Da...
(1) odpowiedzi
2017-07-14 14:07 How to pass model instance from table to modal popup? »
I have this piece of code, which generates a table of records (name and info) and each row should have a edit button which opens a modal popup that al...
(1) odpowiedzi
2017-07-14 09:07 Custom Data Type returning as an Json Object in umbraco »
i am trying to create a carousel as a Data Type, for that i am trying to create a custom Data Type like this from Developers Tab in content section...
(2) odpowiedzi
2017-07-13 19:07 MVC 5 HTML Form Submit Not Firing »
I've been following along with a book titled Pro ASP.net and have come across a rather odd issue. I've got a Razor view linked to a controller, and on...
(3) odpowiedzi
2017-07-13 08:07 System Web HttpException (Renderbody) in MVC »
i am building an online shop in MVC and now working on its design, i downloaded like 2 bootstraps , and tried each one, i copied the index to my _layo...
(2) odpowiedzi
2017-07-13 07:07 Can I use @Viewbag... inside of webgrid column ActionLink format instead of hard-code the the name »
I have several pages to link to depending on the user level. Sample: level 1 goes to pageA, level 2 goes to pageB, etc... Inside of the controller, I ...
(1) odpowiedzi
2017-07-12 22:07 How to set returned Image Data as ng-src of image in AngularJS »
I've got two ASP.Net Core methods at the moment - one tied to an API call, and one tied to a client-side Razor helper. They're both located in my Hom...
(1) odpowiedzi
2017-07-12 15:07 TextBoxFor decimal »
In my database I stored fields with the data type decimal. I am using exactly the same (decimal) data type in my ASP.NET application. This is inside ...
(3) odpowiedzi
2017-07-12 11:07 How to link the categories in database in _layout.cshtml »
i am trying to put the categories in my database on SQL on the homepage of my MVC web , how to link to them I have this in my _layout.cshtml, and i w...
(2) odpowiedzi
2017-07-11 15:07 Refactor the loop to merge one property when other properties are identical in ASP.net MVC Razor »
I have a dataset that currently produces an output as follows: Code: Part 1: The View - @foreach (var dt in Model.PlaceList) { <tr class="Ga...
(2) odpowiedzi
2017-07-11 14:07 Razor - Type of conditional expression cannot be determined »
I'm having an issue with conditional expression. Here is my code: <td>@((test) ? '-' : "No")</td> The error is: Type of conditional...
(1) odpowiedzi
2017-07-11 13:07 MVC - Change Label(s) on DropDown Selection - Strongly Typed View »
MODEL - Employee.cs public class Employee { public int id { get; set; } public string name { get; set; } public int age { get; set; } ...
(1) odpowiedzi
2017-07-10 19:07 Why does the MVC appends aspx to the view names »
In my controller I defined: const string KList = "list.cshtml"; I call the Action method: public ActionResult All() { var view = Empty(); ...
(1) odpowiedzi
2017-07-10 11:07 MVC 4 Razor Engine HttpPostedFileBase not working with Create a strongly-typed view »
In my MVC 4 project, I created a view with using "Create a strongly-typed view" as "Scaffold template: Edit". But in that page I try to upload image w...
(2) odpowiedzi
2017-07-10 09:07 How to add offset in list items? »
I need to add offsets to my list items, but I haven't seen any property that could do that (except marker-offset which is deprecated). In my case I ha...
(1) odpowiedzi
2017-07-09 14:07 How to get value of Html.DropDownList in the controller? »
I have assigned the following viewbag in the controller public ActionResult new_vehicle() { ViewBag.customers = new SelectList(db.custome...
(2) odpowiedzi