Questions tagged [asp.net-mvc-helpers]

templated short-cuts and controls for creating HTML elements and element groups to works with the ASP.NET MVC Framework

templated short-cuts and controls for creating HTML elements and element groups to works with the ASP.NET MVC Framework

24 questions
6
votes
3 answers

MVC3 WebImage helper: resize is converting transparent background to black

I'm trying to create a thumbnail using MVC3's WebImage helper. The original image is a .png with a transparent background. When I try and resize it with the following: var image = blob.DownloadByteArray(); new WebImage(image) .Resize(50,…
AlDev
  • 173
  • 1
  • 7
4
votes
1 answer

Stack Overflow Exception in MVcHtmlString

I have created my own Html Helper which adds red asterisks to any required field. It successfully works with both @Html.myLabelFor(model => model.Description) //and @Html.myLabelFor(model => model.Description, new { /*stuff*/ }) However, some of…
Vadzim Savenok
  • 930
  • 3
  • 14
  • 37
3
votes
1 answer

Call User.Identity.GetUserId() from Helpers with ASP.NET MVC

I'm new with ASP.NET MVC, I moved an HTTP POST method from my controller to Helpers, and I can't call User.Identity.GetUserId() from System.Security.Principal.IIdentity library. Why can I not use this library from the helpers? Thanks
Ben
  • 501
  • 6
  • 20
3
votes
1 answer

MVC @Url.Abs helper does not seem to exist

Just writing a simple mailer using asp mvc mailer I have gone through the tutorial and the email is being send. However i cannot seem to include absolute Urls. In the example they use a Html helper from System.Web.Mvc.UrlHelper The absolute should…
user1752532
1
vote
2 answers

How to put html entity in Asp.net mvc Html helper EditorFor placeholder

If i use raw html with placeholder like: it renders like: that is fine. But if i use Asp.net mvc Html helper…
Arif
  • 6,094
  • 4
  • 49
  • 81
1
vote
0 answers

How can I provide intellisense in custom MVC html helper?

I am making a custom MVC html helper that is similar in many ways to the built in ActionLink helper. I noticed that the built in ActionLink helper has intellisense for actionName and controllerName parameters which I find very useful. My question is…
Marko
  • 12,543
  • 10
  • 48
  • 58
1
vote
1 answer

Why validation is not working with Html.TextBoxFor but is when using Html.EditorFor?

I am trying MVC's datatype attributes, and just created a simple scenario like the following: The View: @model MVC4.Models.Model @{ ViewBag.Title = "DataTypeAttribute"; Layout = "~/Views/Shared/_Layout.cshtml"; }
0
votes
1 answer

How do i display my chart in a view using mvc helpers?

i am using mvc helpers to create a bar graph based on the sum of the hours an employee has worked vs the months. I am using a dropdown list, to filter these charts by the employees name. But i am having a problem, when i click on the dropdownlist…
0
votes
1 answer

How to calculate the sum of hours worked and format the dates to only show the months in mvc using mvc chart helpers

This is my code which is working currently I would like to know if these two things are possible when using mvc charts? And how to go about doing them My controller public ActionResult CharterColumn() { ArrayList xValue = new ArrayList(); …
0
votes
1 answer

Change an TextBoxFor readonly property on whether a checkbox is checked or not

I'm trying to change an TextBoxFor readonly property on whether a checkbox is checked or not. I have read other posts but the answers don't seem to work for me.. I any one please would point out what i miss in the code below.
0
votes
1 answer

How to create a reusable solution for asp.net mvc ValidationMessageFor

I currently got following snippet: @Html.EditorFor(model => model.Street, new { htmlAttributes = new { @class = "form-control tooltp", placeholder = "Rue *", autofocus = "autofocus", data_tooltip_content = "#Street_content" } }) @if…
Senne
  • 183
  • 1
  • 10
0
votes
1 answer

Creating DropDownListFor Using To Tables

I´m having a problem creating a DropDownListFor using a relation between to tables that are related on an entity code first: public class Motivo_Agenda { [Key] [Required] public string DESC_MOTIVO { get; set; } } public class…
0
votes
1 answer

Selected values in Html.DropDownListFor in a dynamically-sized "2D array layout"

I have a view that contains quite many select elements (in the form of @Html.DropDownList or @Html.DropDownListFor). The problem is that they are arranged in a table-like manner and doubly-indexed (the number of rows and columns changes depending on…
InvisiblePanda
  • 1,589
  • 2
  • 16
  • 39
0
votes
1 answer

ASP.Net MVC Helper Breaks Foundation Zurb

I have one problem with the MVC helper CheckboxFor. I found that the generated HTML code create a hidden field and that breaks the style on foundation zurb. I am using this helper on the View: @Html.CheckBoxFor(model =>…
It'sMe
  • 99
  • 1
  • 10
0
votes
0 answers

using html helper for dropdownlist in javascript not working

I am using html helper for dropdownlist in javascript function but it's not working. I have tried using various syntax with or without encoder etc but it is rendering as string not as a html control. Actually I have to create dynamic dropdownlist…
rupinder18
  • 795
  • 1
  • 18
  • 43
1
2