razor-2 Questions
2
Solved
I am creating a control in a Razor Control Library. I am trying to only allow a few keys presses to be allowed in a text box. They are:
Any number greater than 0. This is to include decimals
The l...
8
Solved
I have a class with minimum 4 variables and I have made a constructor for the class so that I can initialize it with
MyClass testobj = new MyClass(1234,56789,"test text", "something ...
Ringmaster asked 26/6, 2013 at 14:1
9
This is the code which I have in my partial view
@model Contoso.MvcApplication.Models.Exercises.AbsoluteArithmetic
@using(Html.BeginForm())
{
<div>
<span style="width: 110px; float:left...
Croat asked 1/1, 2013 at 20:48
6
I'm using Razor Helpers in a C# Web Forms application.
The following code compiles and renders A-OK when called:
@helper MemberListItem(string firstname, string lastname, string avatarUrl)
{
&l...
4
Solved
I am running a solution which contains different projects. However, i am trying to run a project (class library) which contains wcf services using Visual Studio 2015 and framework 4.6 (on windows 8...
Eritrea asked 30/3, 2016 at 21:33
4
Solved
I'm trying to change the emitted name of the html input created by @Html.HiddenFor.
The code I'm using this:
@Html.HiddenFor(e => e.SomeProperty, new { @id = "some_property", @name = "some_pro...
Hachmann asked 11/2, 2013 at 10:18
1
I reuse the same partial for a RazorEngine email using RazorEngine.Parse, but when I use the same Partial in a regular view new RazorEngine.Text.RawString doesnt work and doesnt ignore HTML. I cant...
Burris asked 20/9, 2018 at 21:27
5
Solved
I cloned a project with vs 2013. When I run it I get this error.
Error 1 The "EnsureBindingRedirects" task could not be loaded from the assembly D:\BMaster\packages\Microsoft.Bcl.Build.1.0.13\tool...
Harhay asked 5/2, 2014 at 10:17
2
My solution consist of 2 projects:
MyApp.Rest
MyApp.Core
Core uses Razor templating to generate emails and reports. Rest is a WebAPI only and references Core. Rest has the startup file, where R...
Skimp asked 19/6, 2018 at 18:24
6
In a tag I want to conditionally output the style attribute, e.g.: <li style="@styleVar" >...</li>
When styleVar is null it should not be written by razor (just the supposed standard fu...
Ingrowing asked 7/11, 2012 at 10:19
12
Solved
There are so many topics on SO about issues with the Ajax.BeginForm not correctly updating the target element with the return partial view:
mvc4 ajax updating same page
ASP.NET MVC 4 - Ajax.BeginFo...
Lovell asked 26/2, 2013 at 17:50
7
Solved
I installed Visual Studio 2015 and rebooted. The "MVC" types are not recognized in 2015 but are still recognized in 2013. This is my "Views" web.config:
<configuration>
<configSections...
Lampion asked 23/7, 2015 at 17:55
4
I'm trying to get name of input correct so a collection of objects on my view model can get bound.
@{ViewData.TemplateInfo.HtmlFieldPrefix = listName;}
@Html.EditorFor(m => m, "DoubleTemp...
Nussbaum asked 8/9, 2014 at 8:18
0
I wanted to start a small campaign of about 400-500 emails and I tested the email with mail-tester.com
The problem is that I've got these 2 errors and nobody on the internet knows an answer for it...
Thuthucydides asked 21/9, 2016 at 18:5
6
Case:
I have a list of items of Class X displayed using Editor Template for Class X.
Problem:
How can I get index of an item being processed on the inside of the Editor Template?
Scissor asked 19/6, 2013 at 17:42
1
Solved
What's the difference between these 2 in Razor? I find that I can accomplish the same, whether I use @: or <text>.
Rosetta asked 20/5, 2016 at 14:17
4
Solved
I have three simple layout,
_Layout.cshtml (this is the base layout)
@RenderSection("something", required: false)
@RenderBody()
_Main.cshtml
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
@s...
Photostat asked 19/8, 2013 at 21:15
6
Solved
In my view I would like to access resource strings from the specific local resource on that file.. Just as you know it from web-forms:
(string)GetLocalResource("Title");
Painless and smooth. The...
Rudolphrudwik asked 24/2, 2013 at 0:17
2
How to use dropdown list in cshtml?
I am using below code ,Now it looks like general HTML but problem is not apply the bootstrap styles.
<div class="col-md-10">
@{
List<SelectListItem&g...
Leathers asked 6/3, 2015 at 15:43
3
Solved
I am trying to add a dropdownlist to a strongly typed razor view. ASP.Net MVC 4.0, Razor View engine version 2.0.0.0
@using System;
@model SampleApp.Models.ServiceRequestModel
@{
ViewBag.Title =...
Jaques asked 7/11, 2012 at 11:7
1
Solved
My page contains parts that will render on the client.
The problem I'm having is that razor does not render the parts as I expect them to. For example:
<script type="x-tmpl-mustache" id="filte...
Polynices asked 12/11, 2015 at 7:14
3
I have an HtmlHelper extension method that takes javascript callback functions as parameters.. for example:
@Html.SomethingCool("containerName", "jsCallbackFunction")
<scrip...
Mcquoid asked 4/11, 2013 at 2:20
2
Solved
I was going through the list of NuGet Packages and I was updating everything things like bootstrap, jQuery, etc. but while I was doing that, I unthinkingly updated Microsoft.Owin and another packag...
B asked 19/9, 2014 at 20:8
5
Solved
The project runs fine locally, its only when published I get the following error:
Could not load file or assembly 'System.Web.Razor' or one of its dependencies. The located assembly's manifest d...
Whipcord asked 13/2, 2013 at 22:43
2
I'm new to MVC4/razor2, and I think understand the general benefit of using @Url.Content and @Url.Action- if my routing or virtual directory changes, magic-url-strings are correctly rendered.
I'm ...
Chevalier asked 2/9, 2014 at 13:54
1 Next >
© 2022 - 2024 — McMap. All rights reserved.