6 items found in the Extension Method Category
HTML5 Form Helpers For WebMatrix
Mikesdotnetting
-
20 September 2012 14:56
It's an odd thing: WebMatrix 2 is lauded for its support of HTML5, but the Web Pages framework doesn't include any helpers for the new HTML5 form input types such as email or color. It's fair to say that support among browsers for the new inputs is patchy at the moment, but with barely a week flying past without a new version of one or other browser being released, it won't take long for that to change. So in the meantime, if you prefer to use helpers, you have to write your own for rendering HTML5 forms.
Click to read more about HTML5 Form Helpers For WebMatrix ...
Filed under:
Extension Method
ASP.NET Web Pages
WebMatrix
HTML5
as
Tutorial
Viewed: 17106 times
Why You Can't Use Extension Methods With A WebGrid
Mikesdotnetting
-
27 January 2011 12:58
An interesting question came up recently on the ASP.NET forums. In it, the questioner was attempting to use my Chop() extension method to limit the number of characters in a WebGrid column but it wouldn't work. At first, I was a little stumped, so I tried it myself and got an error message:
Click to read more about Why You Can't Use Extension Methods With A WebGrid ...
Filed under:
Extension Method
ASP.NET Web Pages
WebMatrix
WebGrid
as
Snippet
Viewed: 5381 times
WebMatrix - Database Helpers for IN Clauses
Mikesdotnetting
-
11 September 2010 09:35
There are times when you want to query a database for records matching a range of values, but you do not know what those values are, or even how many there are at design time. You could dynamically build your WHERE clause with multiple ORs, or you can use the SQL IN clause - except that the current database helpers in WebMatrix don't make this easy. It's about time that was fixed....
Click to read more about WebMatrix - Database Helpers for IN Clauses ...
Filed under:
Extension Method
ASP.NET Web Pages
WebMatrix
Razor
as
Tutorial
Viewed: 10359 times
Converting URLs Into Links With Regex
Mikesdotnetting
-
22 May 2010 22:56
Following on from the recent spate of extensions methods I've posted, here's another I use to convert URLs and email addresses into links within HTML. You may want to restrict users from submitting HTML tags via forms in your application, which means that URLs and email addresses that they submit appear as plain text unless they are subjected to some kind of processing.
Click to read more about Converting URLs Into Links With Regex ...
Filed under:
C#
Extension Method
as
Snippet
Viewed: 5814 times
Highlighting Keywords Found In Search Results
Mikesdotnetting
-
22 May 2010 19:41
A common question in the forums is how to highlight key words found in search results. Here's an extension method that does that, both for partial matches, or whole word matches.
Click to read more about Highlighting Keywords Found In Search Results ...
Filed under:
C#
ASP.NET 3.5
Extension Method
ASP.NET Web Forms
as
Snippet
Viewed: 8813 times
Displaying The First n Characters Of Text
Mikesdotnetting
-
16 May 2010 09:59
Displaying the first n characters of a block of text on a page without chopping words off halfway through is a common requirement. There are a number of ways to achieve this, but here's an extension method that you might find useful.
Click to read more about Displaying The First n Characters Of Text ...
Filed under:
C#
ASP.NET 3.5
Extension Method
as
Snippet
Viewed: 8481 times


