<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Creating Custom HTML Helpers</title><link>http://asp.net</link><pubDate>Tue, 24 Nov 2009 15:32:21 GMT</pubDate><generator>umbraco</generator><description>Comments for Creating Custom HTML Helpers</description><language>en</language><atom:link href="http://asp.net/rss/comments/27483" rel="self" type="application/rss+xml" /><item><title>Comment Posted by cv_vikram</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Wed, 27 Aug 2008 07:00:41 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006934</guid><description><![CDATA[ <p>Thanks..</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/cv_vikram.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by amanprogrammer</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Tue, 16 Sep 2008 17:11:54 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006935</guid><description><![CDATA[ <p>Stephen You rock. Thanks.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/amanprogrammer.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by topfan</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Wed, 24 Sep 2008 01:54:45 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006936</guid><description><![CDATA[ <p>great I think I will start learining MVC</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/topfan.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by enginuysal</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Wed, 01 Oct 2008 08:31:55 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006937</guid><description><![CDATA[ <p>thanks a lot, keep the good work.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/enginuysal.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by enginuysal</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Wed, 01 Oct 2008 08:37:10 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006938</guid><description><![CDATA[ <p>Couldn&#39;t find any c# version.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/enginuysal.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by chudq</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Sun, 05 Oct 2008 12:03:00 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006939</guid><description><![CDATA[ <p>Can I use VS 2008 Express for MVC project?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/chudq.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by swalther</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Thu, 16 Oct 2008 21:57:49 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006940</guid><description><![CDATA[ <p>@chudq -- Yes, you can use VS 2008 Express to create MVC projects but you need to install Visual Studio Service Pack 1.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/swalther.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by humaneko</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Thu, 23 Oct 2008 12:21:07 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006941</guid><description><![CDATA[ <p>It will be great to find a C# version ^^</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/humaneko.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by GillouX</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Sat, 08 Nov 2008 09:38:36 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006942</guid><description><![CDATA[ <p>what&#180;s the problem of all these C# developers ...</p> <p>what is important is the framework and not the way to &quot;attack it&quot;.</p> <p>if you are not able to understand the vb examples and convert it to C# yourself, you should consider about finding a new job.</p> <p>Great set of vidz.</p> <p>yet another C# developer.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/GillouX.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by anthonywjones66</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Sun, 16 Nov 2008 10:26:55 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006943</guid><description><![CDATA[ <p>C# version not required, its hardly rocket science to port to the techniques ot C#.</p> <p>I don&#39;t think its a good idea to extend the set of Html helper methods. &#160;It would be better to use a custom class of your own, i.e., use &quot;the easy way&quot;.</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/anthonywjones66.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by michael.lukatchik</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Tue, 18 Nov 2008 15:27:58 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006944</guid><description><![CDATA[ <p>Both ways of rendering HTML controls will become standard practice. &#160;For me, extension methods, although slightly less easier, will become &quot;second hand&quot; after using them. &#160;Plus they&#39;re available though Intellisense which is pretty cool.</p> <p>All else aside, I bet we&#39;ll eventually see a lot of custom extension methods showing up on the web over the next few months...</p> <p>-Michael</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/michael.lukatchik.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by jthanassis</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Sun, 07 Dec 2008 12:52:31 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006945</guid><description><![CDATA[ <p>The concept of using a generic html library for producing html tags is not new. PL/SQL has built-in functions for doing this for over a decade now.</p> <p>My personal opinion?</p> <p>These html helpers are totally useless. I could hardly find a real use of these helpers.Maybe in cases I need to print html directly from the code-behind of a &#160;usercontrol. </p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/jthanassis.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tran_huu_nguyen</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Wed, 07 Jan 2009 23:22:08 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006946</guid><description><![CDATA[ <p>VB =&gt; C#</p> <p>========</p> <p>_ Module == static class</p> <p>_ &lt;Extension()&gt; == Extention Method</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/tran_huu_nguyen.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Chris Byrom</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Tue, 24 Feb 2009 20:47:48 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006947</guid><description><![CDATA[ <p>I am assuming the standard Helper methods allow you to do things such as set the class and what not of the rendered element.</p><p></p><p>If you use the Extension Method paradigm, can you modify one of the standard helpers? Can you for example, set attributes within the Extension Method?</p><p></p><p>I have an application that uses Struts, in which I use a modified JSP tag to check whether or not a user has access to the specific field that is about to be rendered. If they do not, i set the readonly and disabled attributes for that element to true.</p><p></p><p>So if you can do things like that, the HTML Helpers are very valuable.</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/Chris%20Byrom.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Danny117</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Fri, 13 Mar 2009 15:29:11 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006948</guid><description><![CDATA[ <p>Great! </p><p>Besides the parameters are there any limitations on the logic I can use in my helpers?</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/Danny117.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ITIL</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Thu, 19 Mar 2009 13:11:32 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006949</guid><description><![CDATA[ <p>Do have someone a good idea over asp.net for starter? I am starter, any good books any suggestions! i will appreciate the help.</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/ITIL.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by senthilkumar.moorthy</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Wed, 15 Apr 2009 09:29:15 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006950</guid><description><![CDATA[ <p>how can i write htmlhelper for imagelink ,when i click image link that should call method in controller</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/senthilkumar.moorthy.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by vinothkumarsi</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Mon, 20 Apr 2009 12:06:48 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006951</guid><description><![CDATA[ <p>Hi my design is looking correctly in IE but not in any other browser</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/vinothkumarsi.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by dba123</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Tue, 16 Jun 2009 14:10:06 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006952</guid><description><![CDATA[ <p>yea, should be C# examples...</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/dba123.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by jimschubert</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Wed, 08 Jul 2009 22:27:36 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006953</guid><description><![CDATA[ <p>Excellent video.</p><p></p><p>For those using C# who aren&#39;t familiar with extension methods, building with the Extension attribute will say to use &quot;this&quot; instead.  Here is the code:</p><p></p><p>/Helpers/LabelExtension.cs</p><p></p><p></p><p>using System.Web.Mvc;</p><p>using System;</p><p></p><p>public static class LabelExtension</p><p>{</p><p>    public static string Label(this HtmlHelper helper, string target, string text) </p><p>    {</p><p>        return String.Format(&quot;&lt;label for=&#39;{0}&#39;&gt;{1}&lt;/label&gt;&quot;, target, text);</p><p>    }</p><p>}</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/jimschubert.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by roblem</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Thu, 27 Aug 2009 20:57:28 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006954</guid><description><![CDATA[ <p>How do you create the module in C#? </p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/roblem.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by roblem</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Thu, 27 Aug 2009 21:14:13 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006955</guid><description><![CDATA[ <p>sorry should have scrolled to the bottom first.</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/roblem.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by valmont33</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Wed, 30 Sep 2009 04:27:25 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006956</guid><description><![CDATA[ <p>lol...</p><p></p><p>&lt;%=Html.TextBox(&quot;txtBox&quot;) %&gt;</p><p>&lt;input name=&quot;txtBox&quot; /&gt;</p><p></p><p>How is this better or same time?</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/valmont33.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Saintless</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Thu, 05 Nov 2009 18:56:19 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006957</guid><description><![CDATA[ <p>I&#39;m really glad you&#39;ve put these videos up - they are very helpful. I just have one tiny complaint. The intro and end sounds with the ASP.net logo are way too loud! I&#39;m watching at work, so I&#39;m using earbuds, and it hurts when that part plays!</p><p></p><p>But again - love the videos - they are a very useful resource!</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/Saintless.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by iandersen</title><link>http://asp.net/mvc/videos/mvc-2/how-do-i/creating-custom-html-helpers</link><pubDate>Tue, 24 Nov 2009 15:32:21 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000006958</guid><description><![CDATA[ <p>Nice!</p><p></p><p>Just wondering....</p><p></p><p>Would it be ugly-code if instead of passing tag-values in a helper parameter, I fx pass myItem.Id, and in my extensionmethod I evaluate the state of my object, and from there decide to return what-ever html content I should wish (img, video.. and so forth)? This way you can have different output-types in one column. This would act like a data-trigger for your column. </p><p></p><p>Or is it to be done in another way? (I&#39;m new to HTML/Web-programming in general :)</p><p></p><p>Ugly or not. I think i will play a bit with it, just for the exercise :) </p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/iandersen.jpg?forceidenticon=false&amp;dt=635048051400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item></channel></rss>