Data dodania Pytanie
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
2017-11-25 19:11 Conditional statement in c# expression in Razor »
How can I write this if statement @if (camera.IsInStock) { <span class="text-success" style="float:right">IN STOCK</span> } else { ...
(1) odpowiedzi
2017-11-25 14:11 Nullable Date field shows 'dd/mm/yyyy' in chrome »
I have following @Html.EditorFor(model => model.Details[0].ExpiryDate, @getHtmlAttributesForText(true, "", "form-control")) Expiry date in view...
(0) odpowiedzi
2017-11-24 16:11 How to add Engine.Razor reference in a windows service in mvc application »
I am unable to add System.Web.Razor reference in a windows service. Added below code in app.config and added the .DLL reference in references folder a...
(0) odpowiedzi
2017-11-24 11:11 Dynamically adding to a page with MVC »
I have a Razor View which has a section where the user can add new rows for ad-hoc opening/closing times on specific dates. It consists of three cont...
(1) odpowiedzi
2017-11-24 09:11 Visual Studio + ReSharper treating some Razor statements as errors »
Current setup: Visual Studio 2015 Professional and ReSharper Ultimate 2017.2.2. I've started looking into ASP .NET MVC and I've found that ReSharper ...
(0) odpowiedzi
2017-11-23 17:11 Ajax calls without AjaxHelper in aspnet core 2 »
I was trying to implement an asynchronous call with ajax in my aspnet core 2.0 project, using "Ajax.BeginForm", but then I discovered according to the...
(0) odpowiedzi
2017-11-23 11:11 Case sensitive in search result with RegExp in razor MVC RSS »
Hello I have the following code for displaying result from search. @foreach (var str in (item.ContentText.Split(new char[] { '?', '<', '!', '<'...
(1) odpowiedzi
2017-11-23 04:11 ASCII characters causing issue with onclick() javascript »
I am trying to create an onclick element that plays a song when the play button is clicked. The way I have it set up works great for songs that do not...
(2) odpowiedzi
2017-11-22 20:11 My checkbox input is always returning "on" »
I have a postback input that is a checkbox and it seems to be returning on whether its checked or unchecked. <div> <input class="postbac...
(0) odpowiedzi
2017-11-22 16:11 ASP MVC 5 : How to pass Integer from controller to the view »
I want to call a variable from the controller in my view in ASP MVC 5. I tried using ViewBag but the variable get Null Value. This is what I've tri...
(2) odpowiedzi
2017-11-22 15:11 Core 2 Razor AccesDeniedPath »
I was following a Connect() video where they are securing a core 2 MVC app. In it, they added options for AccessDeniedPath and LoginPath However, I...
(1) odpowiedzi
2017-11-21 10:11 Up down arrow in table MVC asp.net »
I have a list with up and down button on the left. How to make the first table row with only "down" button and the last table row with "Up" button? Th...
(3) odpowiedzi
2017-11-21 09:11 Pros & cons to using constants in place of css class names for razor views »
Background I work on an international team of developers. I'm constantly finding issues with misspelled class names causing issues with formatting. ...
(0) odpowiedzi
2017-11-21 00:11 Generate Email HTML using Razor in an ASP.NET MVC Project »
I have an ASP.NET MVC project that uses Razor for rendering HTML using the built-in engine. I would like to create Email Templates using the same pro...
(1) odpowiedzi
2017-11-20 22:11 Actionlink with no routeValues being loaded with routeValue breaking dynamic pages »
When you have an actionlink that is written with no routeValues and you load that page with a routeValue specified MVC writes out the actionlink incor...
(1) odpowiedzi
2017-11-20 17:11 ASP.NET Core - acessing object from razor in code behind »
I'm new to ASP.NET Core, so I'm still trying to understand it. I was trying to access an object from code behind. Is it possible? I have been trying ...
(2) odpowiedzi
2017-11-20 07:11 how I creat variable and declare that in view razor asp.net mvc 4 »
can someone fix my code, I want to make variable for disable my textbox foreach (var item in Model.rol_tb_approve1) { if (Model.rol_tb_fo...
(2) odpowiedzi
2017-11-19 17:11 Implement MVC ViewRenderer in a .NET console application »
I added a newsletter feature to my MVC 5 project to send constructed mails to all subscribed users. I’ve a class with public async Task<Newslette...
(1) odpowiedzi
2017-11-19 17:11 Upload Image ASP.NET MVC »
Hey I want to upload picture and save that picture to a folder, and save the name of that picture to DB in addition I am also using model binding for ...
(1) odpowiedzi
2017-11-19 06:11 Servicestack include _Layout.cshtml in Razor Content Page »
How can I include _Layout.cshtml in Razor Content Page ? For example I created two cshtml files in root of my project. First file is _Layout.cshtml...
(1) odpowiedzi
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