Data dodania Pytanie
2017-11-18 19:11 ASP.NET CORE MVC: `asp-action` doesn't create the `href` attribute »
Visual Studio 2017 (v15.4.4) ASP.NET CORE MVC Code source: @model Razor.Models.GuestResponse @{ Layout = null; } <!DOCTYPE html> <htm...
(1) odpowiedzi
2017-11-18 13:11 catch value in razor »
I try to catch value of input, here's the input: <div class="form-group"> @Html.LabelFor(model => model.Price_Selling, htmlAttri...
(0) odpowiedzi
2017-11-18 03:11 Serving .cshtml files on IIS globally »
I am trying to setup intranet IIS 8.5 (Win8.1) to globally serve .cshtml (Razor) files. The corresponding Application Pool is set to v4.0. The files ...
(1) odpowiedzi
2017-11-17 16:11 How to force tag helper for hidden fields to render bool value in lower case »
I have a view model with a simple bool-property like this one: public bool HasAnyProductsThatRequirePhoneNumber { get; set; } I'm using a tag hel...
(1) odpowiedzi
2017-11-17 15:11 ASP.NET MVC 4 - razor empty post in for loop »
I have the following code in razor: @for (int i = 0; i < Model.Count; i++) { using (Html.BeginForm("Bonnen", "Bon")) { ...
(3) odpowiedzi
2017-11-17 10:11 @HTML Dropdownlist selected value »
I'm new to Razor and I don't get why my selected value is not working. var listItems = (List<Categories>)ViewBag.Categories; Used in @for (va...
(1) odpowiedzi
2017-11-16 15:11 Razor View IF to a partial div »
The thing is that Im trying to change background color of a div depending on an IF condition inside a foreach and I didnt wanted to make an entire rep...
(1) odpowiedzi
2017-11-16 05:11 Robust solution for rendering Emails in ASP.NET Core 2.0 »
I tried the solution made my Ian Rufus and it has one big drawbacks - when you publish your web app, all views get compiled. And since the rendered lo...
(0) odpowiedzi
2017-11-16 03:11 Avoiding Repetitive View Code in ASP.NET MVC »
This is for an ASP.NET MVC 4 application in a Razor view. I am passing a model to a partial view and am trying to iterate through a given list of prop...
(1) odpowiedzi
2017-11-15 14:11 Stop the navigation bar from refreshing - Umbraco »
I couldn't find anything regarding my issue so I decided to post one myself. I am using a navigation bar that has dropdown menu's. Whenever I open th...
(1) odpowiedzi
2017-11-15 11:11 c# 7 tuples not working (roslyn compiler exception) »
For some time we're using some of the new c# 7.0 features in our razor files. We've integrated the Roslyn compiler into our web projects, which are cu...
(1) odpowiedzi
2017-11-15 04:11 ASP.NET MVC razor: conditional attribute in CSS block »
Can I use if condition in style tag like this? <style> @@media (min-width: 765px) { html,body { min-width: auto; ...
(1) odpowiedzi
2017-11-14 20:11 Set property "readonly" for @Html.TextBoxFor( ) dynamically based on fetched information from db »
I have multiple Textboxes defined using @Html.TextBoxFor(). Now I want some of them to be only "readonly" and some of them editable, based on the role...
(1) odpowiedzi
2017-11-14 17:11 MVC Razor build onclick event dynamically to show modal »
I am currently trying to attach a click handler to my <a> tag which will pop up my modal which has a dynamic id. I am having trouble figuring ou...
(3) odpowiedzi
2017-11-14 12:11 ASP.Net MVC Usage confusion »
I'm in a situation where I would like to take a value from a page using JQuery, update the model with that value, call a method to update a different ...
(1) odpowiedzi
2017-11-13 21:11 Modal Bootstrap on ASP.NET MVC »
I trying to do a responsive async page with Modal bootstrap, it´s things all right, although when a save object on modal form, is did a update, but t...
(0) odpowiedzi
2017-11-13 18:11 How do I add default (Default to browser country) country code before the mobile number in MVC ASP.NET? »
I have got a Textbox accepting mobile number. How do I add default (Default to browser country) country code before the mobile number? I am using MVC...
(1) odpowiedzi
2017-11-13 13:11 view a PDF without downloading it »
Now my controller returns the file in this way: [HttpGet] public IActionResult document(int id) { var byteArray = db.instances.Where(c => c....
(1) odpowiedzi
2017-11-12 23:11 How to add claims to the HttpContext User on sign in »
This post may be long, but will have all the pertinent detail required for an answer. I have been searching, and found that many others have as well...
(1) odpowiedzi
2017-11-12 20:11 MVC, post partial model »
I have object A which has a List<ObjectB> ObjectB has several properties. Id, Mandatory, Name etc. So I return a viewmodel (ObjectA) and have t...
(1) odpowiedzi
2017-11-12 17:11 Tinymce is not returning HTML but just text »
I'm struggeling with this problem. I'm very new to javascript i had tinymce v3 for my website working, but i wanted to update it also looked way to co...
(1) odpowiedzi
2017-11-11 08:11 Retrieve varchar as url link from SQL Server to Razor »
I'm trying to retrieve a varchar from SQL Server to create an Url.Action in Razor asp.net. The SQL cell looks like this: "Index","Contact" The cod...
(0) odpowiedzi
2017-11-11 03:11 MVC .Net Core Entity Framework how to pass EditorForModel form data thru Ajax »
I'm trying to use Ajax to pass my form data for creating a database object to the create action. I am doing this because I want to update a partial w...
(1) odpowiedzi
2017-11-10 23:11 TextBoxFor: INumber type but with default value = "" »
I'm using Asp.net Core 2.0 and I have the following code: @Html.TextBoxFor(model => model.personalData.sonsNumber, null, new { type = "number", va...
(1) odpowiedzi
2017-11-10 22:11 ASP.NET MVC Select Option Value of SelectList »
I am rendering a dropdown list. ViewBag.Categories = new SelectList(db.HelpCategories, "ID", "Name"); In my view I call it like this: Categories:...
(1) odpowiedzi
2017-11-10 17:11 Razor pages action tag helper does not generate query parameter »
I am following this msdn example Add Column Sort Links to the Students Index Page And exactly like the example am trying to add links to my current p...
(0) odpowiedzi
2017-11-09 22:11 Uncaught TypeError: $(...).autocomplete is not a function in ASP.MVC application »
I have simple ASP.NET MVC Index page where I want to include autocomplete search textbox. I have included reference also. But still its showing the sa...
(1) odpowiedzi
2017-11-09 20:11 Mvc section not rendered in head but in body »
I encountered a strange behavior for @RenderSection in the head section of _Layout. @section AddToHead{ <meta name="test" /> <open-...
(1) odpowiedzi
2017-11-09 14:11 MVC Razor EditorFor Display Field help when hover over field aka tooltip »
For a data entry field I want to display a hint for the user when they hover over the field. The field name is INACT and indicates if the record ha...
(2) odpowiedzi
2017-11-08 21:11 Get rid of Visual Studio warning which in reality would never happen »
I have a <span> which the value is depended upon a condition: @{ if(Session["Status1"]!=null){ <span id="currentStatus">...
(1) odpowiedzi
2017-11-08 13:11 quotation marks unmatched when "->" is on the second line »
I a writing data-content for bootstrap popover and I want to preserve line breaks in formatting. so I used .popover { white-space: pre-wrap; ...
(1) odpowiedzi
2017-11-08 11:11 Passing a ViewModel to a Partial View call in the Layout.cshtml »
BACKGROUND I am trying to make use of Dashboard template on an MVC application I'm working on. I am not sure how I can pass a ViewModel to the top...
(1) odpowiedzi
2017-11-07 21:11 Why my MVC view passes null but not the value it has? »
View shows proper value (OrderId = 3): // GET: public ActionResult ConfirmOrder() { //simplified code here var model = new ConfirmOrderVie...
(1) odpowiedzi
2017-11-07 19:11 Location the anchor tag for Home, About and contact buttons »
I am new to ASP.net MVC web development. I created the default MVC application! In the top of the Home page You find Home,About and contact buttons. ...
(3) odpowiedzi
2017-11-07 09:11 Umbraco 7 foreach loops through same image »
Having a bit of difficulty displaying images correctly in a foreach loop in Umbraco, am noob in C# and Umbraco. It loops through the articles just fi...
(1) odpowiedzi