Questions tagged [htmlextensions]
22 questions
19
votes
3 answers
MVC 3 htmlhelper extension method to wrap around content
I searched but could not find any quick solutions for an MVC 3 htmlhelper to create a wrapper method. What I'm looking for is something like:
@html.createLink("caption", "url")
{
content in tags
}
the result should have

Sanj
- 3,770
- 6
- 26
- 31
6
votes
1 answer
Value using HTML extension is different than what it is supposed to be if two models have a property with the same name
Here is my scenario.
Created two Models that have a common property name
public class SimpleModel1
{
// Some Properties
public string Property1 { get; set; }
}
public class SimpleModel2
{
// Some Properties
public string Property1 { get; set; }…

Pitamber Tiwari
- 536
- 1
- 6
- 19
3
votes
1 answer
How to create custom strongly typed HtmlHelper?
For example when using a
@Html.TextBoxFor(v => Model.Text);
and submitting the form, the value in the TextBox is automatically assigned to Model.Text.
I want to write such a custom HTML helper.
I know how to write such a extension method for…

user1832348
- 90
- 5
2
votes
2 answers
ASP.Net MVC 3 - Html Extensions
I'm playing around with Razor + MVC 3 and have a really simple scenario... Basically I'm trying to create a very basic HTML helper but I'm getting the following exception:
'System.Web.Mvc.HtmlHelper'
does not contain a definition for
…

vdh_ant
- 12,720
- 13
- 66
- 86
2
votes
0 answers
AjaxControlToolKit HTMLExtender ImageUpload works on localhost, not server
So, I've looked over everyone's questions, and I can't seem to find a reliable answer. I find it hard to believe that AjaxControlToolKit would release an item that couldn't work on a public facing website. So here's my question.
My…

Laki Politis
- 147
- 9
2
votes
1 answer
Creation of input HtmlHelpers (eg: input type=file)
We need validation attributes on and no HtmlHelper is provided in this respect.
So we started developing a new helper.
To find out how, we looked over the MS code by using JetBrains dotPeek and found everything we need in InputExtensions.cs from…

radu florescu
- 4,315
- 10
- 60
- 92
2
votes
2 answers
Passing Container.Eval to (Html.ReaderPartial) inside ASP.NET Repeater Control
I am trying to pass Eval to Html.RenderPartial inside ASP.NET Repeater but it does not work can any one help?
<% Html.RenderPartial("UserControl1",Eval("Title")); %>
…

Khaled Musaied
- 2,513
- 3
- 25
- 38
1
vote
0 answers
Getting error eg. unexpected keyword or identifier in htaccess file, how to remove it or is there any other way to remove file extension from url
My .htaccess file code
RewriteEngine On
RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]

pooja
- 11
- 3
1
vote
0 answers
Cross browser extended native elements, with Polymer
Heya everyone,
I try to create a native element extension for < option> elements with polymer.
The Idea is, to make more complex descriptive texts for options, stylable for usability.
Usability problem:
It is not a big thing, but a project (service…

Midi
- 11
- 2
1
vote
1 answer
How to remove HTML Extension from a URL?
Is there any way to remove the .html from a URL? I haven't host the site yet. Existing URL is "file:///E:/SampleWorks/Download.html" and I would like to change it to "file:///E:/SampleWorks/Download". How can I do this?

Arun Raj R
- 2,197
- 3
- 13
- 23
1
vote
4 answers
Using a strongly typed ActionLink when the action method doesn't take a primitive type
Does anyone know how I could go about doing something like :
Html.ActionLink(c => c.SomeAction(new MessageObject { Id = 1 } ))
This should output a link with the url of "/Controller/SomeAction/1", pointing at an ActionMethod along the lines…

mattcole
- 1,229
- 2
- 12
- 22
1
vote
2 answers
Adobe CC: How HTML5 extensions work?
recently, I've been looking into how to create an Adobe extension. In CC versions, you can build HTML5 extensions which includes knowledge of HTML/CSS/JS only. This sounds really interesting but, the only thing I am not sure how they work and there…

Muhammad Talha Akbar
- 9,952
- 6
- 38
- 62
1
vote
1 answer
htaccess for Dynamic URL Rewrite with .html extension based on url selection
I'm trying to rewrite some dynamic page url in which data is taken from database with slug like "this-is-a-link".
Options +FollowSymlinks
RewriteEngine On
RewriteBase /testweb/
RewriteCond %{REQUEST_FILENAME} !-d…

user2669827
- 25
- 8
0
votes
2 answers
HtmlExtensions looking for this HtmlHelper htmlHelper
i've attempted to add some htmlextensions to my mvc project. When i try to use them they are all expecting a this HtmlHelper htmlHelper parameter? but according to all examples these are not expected.. what i am doing wrong?
public static string…

billy jean
- 1,399
- 4
- 25
- 45
0
votes
2 answers
cannot get html extension when using handlebars
sorry this might be a very silly question but I cannot figure it out. So I am using express-handlebars and I want to name my file newpage.handlebars. But it keeps on saving as a text file. However, I want it to be a HTML extension but the name to be…

Safwan Ull Karim
- 652
- 5
- 10
- 20