Questions tagged [htmlextensions]
22 questions
0
votes
0 answers
Why HtmlExtension in MVC makes radio buttons unclickable?
i have a very simple HTML extension :
public static MvcHtmlString test(this HtmlHelper helper, IHtmlString item)
{
var inputTag = new TagBuilder("div");
inputTag.MergeAttribute("class", "dropdown-with-tab-content…

Timsen
- 4,066
- 10
- 59
- 117
0
votes
3 answers
Razor html helper parameter shows message about redundant conditional ternary expression usage
Why there is a Visual Studio message about redundant conditional ternary expression usage, when there is a mouse over expression (also expression "true : false" has lower opacity). Does it tell me about i can write somehow less code to get what i…

olly
- 63
- 9
0
votes
2 answers
How can I change my checkbox to radio buttons?
So, I want to change my checkbox, that has checked and unchecked state to radio buttons that say, Yes (checked) or No (unchecked).
Here's what I did for the checkbox:
In my view: …

Kala J
- 2,040
- 4
- 45
- 85
0
votes
1 answer
Extend the HTML Grid for adding div at the end of Html Grid (MVC Contrib)
I have search the web to find a syntax or a guide to this but with no success.
I will appreciate any help.
I have implemented a Grid in a view, and instead of using the paging of the grid view i am trying to implement a button "View More" at the end…

Silagy
- 3,053
- 2
- 27
- 39
0
votes
4 answers
TextBoxFor for Nullable type
How can i user TextBoxFor for nullable type, in my case DateTime?
<%:Html.TextBoxFor(m => m.LeaseDate.Value.ToShortDateString(), new { @class = "def-text-input datetime-input" })%>
I try this, but get error :
Exception Details:…

user3296938
- 75
- 1
- 10
0
votes
1 answer
Configure the Javascript function + Html Helper
Is there a way to configure a Javascript(which accepts few parameters) and initialize a function with user specified parameters in an unobtrusive way with data-attributes?
Any reference would be great help
InitializeLogging({
Url: "/xxx/yyyy",
…

SCP
- 63
- 1
- 7
0
votes
1 answer
How to access view content between curly brackets in a helper extension
Is there a way to get the content of a view between curly brackets in a html helper extension, so that I can either display the content or not depending a conditional element. The idea is to test if the user has access to specific content, if so…

Peter Webb
- 3
- 1