Most recent comments
Robert 7/15/2014 10:18 AM
In response to Using ASP.NET Identity with Razor Web Pages
Mike, Is there a security benefit over the Simple Membership Provider? Thanks...
zircon747 7/14/2014 5:05 AM
In response to C# Regular Expressions Cheat Sheet
Manoj Patil 7/10/2014 11:28 PM
In response to Sessions and Shopping Carts
Thanks. Really Helpful...
Scott 7/10/2014 6:54 PM
In response to Lists with iTextSharp
Thanks so much for these guides. Using them and other posts I've dug up, I've managed to produce I I...
Steve 7/8/2014 10:28 PM
In response to Migrating Classic ASP To ASP.NET Razor Web Pages Part Three- Include Files And Reusable Code
I need to pass variables from a "master" page to the header/footer, which I am including using "This...
gjuro 7/6/2014 10:03 PM
In response to Adding A Controller
sentence Run the application and browse to local_host:XXX_HelloWorld_Welcome_Mike_3 is missing the...
Ed 7/6/2014 3:36 AM
In response to WebMatrix - URLs, UrlData and Routing for SEO
Hi mike, On that last comment, please disregard the 2nd part...da Googles gave me dis: Variable...
Ed 7/6/2014 3:26 AM
In response to WebMatrix - URLs, UrlData and Routing for SEO
This is one of those things that make WebPages "golden" to me, and your article, though I'm only was...
Nuri 7/4/2014 4:01 AM
In response to More Flexible Routing For ASP.NET Web Pages
Mike, does this article and related WebPageRouteHandler.cs still apply to Web Pages 3.0?...
kishor 7/2/2014 12:51 PM
In response to Highlighting Keywords Found In Search Results
it will give an error if I give a single ( or ) as a keyword...
Most Popular - Last 7 Days
Most Popular - Last 30 Days
Most Popular - All Time
Mikesdotnetting - Tuesday, July 6, 2010 8:51 PM
There has been a spate of announcements recently from Scott Guthrie, the main Microsoft man responsible for ASP.NET over the last week or so - the launch of IIS Express, a new version of SQL Server Compact Edition (CE) that can be run in medium trust environments, and a new View Engine and syntax called Razor. Each of these announcements have generated a lot of reaction, and they are each significant in themselves. They all make ASP.NET easier for existing developers. However, if you put them all together, and throw in a new framework and IDE, they make ASP.NET much, much easier for new developers coming to ASP.NET for the first time. So that's what Microsoft have gone and done. And today, they have announced the first Beta version of WebMatrix - a head-on competitor to WAMP stacks.
Mikesdotnetting - Wednesday, June 23, 2010 7:43 AM
Include files within classic ASP are about the only way to achieve some measure of code-reuse within frameworks that offer little or nothing by way of composition or inheritance. Judging by the number of questions in forums, there are still a lot of people moving across from classic ASP who are puzzled as to how to approach replacing include files within ASP.NET. A number of articles illustrate individually how to do so for site-wide layout reasons, including widgets, reusing global functions, or actually including the content of a file. However, I haven't been able to find one resource that brings all these together, hence the purpose of this article.
Mikesdotnetting - Monday, June 14, 2010 10:15 AM
Named Anchors are used to generate links to specific locations within a web document. Unless you are careful, you may end up having a little trouble getting these to work using the MVC LinkExtension helpers.
Viewed: 13178 times
Mikesdotnetting - Monday, May 31, 2010 8:42 PM
My previous article showed how to use a custom ActionResult and the classes within WCF to generate an RSS feed. There are no similar classes to help build a valid Google Site Map for an ASP.NET MVC application. So here's how your can build your own.
Viewed: 7602 times
Mikesdotnetting - Monday, May 31, 2010 9:14 AM
When I looked at producing RSS Feeds in ASP.NET MVC before, I used the ContentResult method to return XML. Best Practice suggests that you should create a new ActionResult if required. So this article looks at creating an RssResult, and a different way to generate the feed itself.
Viewed: 7860 times
Mikesdotnetting - Saturday, May 22, 2010 10:56 PM
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.
Mikesdotnetting - Saturday, May 22, 2010 7:41 PM
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.
Mikesdotnetting - Friday, May 21, 2010 9:12 PM
The jQuery Cycle plug-in is most often used for creating image slide shows. However, it's just as easy to use to create a news scroller from a ListView. Here, I look a doing just that. I also look at an alternative jQuery plug-in (NewsTicker) that gives the effect of the classic BBC News Ticker.
Mikesdotnetting - Sunday, May 16, 2010 9:59 AM
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.
Mikesdotnetting - Monday, May 3, 2010 11:36 PM
Managing shopping carts using Sessions is the source of much confusion for beginners to ASP.NET. This article looks at how to do this so that items can be added and removed by customers easily before they commit to their purchase.
Viewed: 54201 times
Mikesdotnetting - Monday, April 19, 2010 10:24 PM
People often post questions to the forums at www.asp.net asking what they need to learn to become an accomplished ASP.NET Web Developer. Answers vary, but tend to focus on learning the framework and a bit of SQL, along with finding your way around Visual Web Developer, or if you can afford it, Visual Studio. My answer tends to consist of the same list of items:
Viewed: 15075 times
Mikesdotnetting - Monday, March 29, 2010 10:17 PM
The MVC 2.0 Framework was finally RTM'd on March 11th 2010, so I took the opportunity to update my Contact Manager application with some of its new features. While the focus of this article is validating the Model using DataAnnotations, I also touch on one or two other new features in the latest release.
Viewed: 15130 times
Mikesdotnetting - Monday, February 22, 2010 9:53 PM
It seems that the whole world (and Margate) is having its say on which is better - MVC or Web Forms. Scott Guthrie posted his views on technical debates in general, and then contributed his thoughts on MVC v. Web Forms. Ian Cooper has an interesting contribution to make to the debate too. Rob Conery (formerly of Microsoft) posted probably the most linked to opinion on the matter. (There - I've just added another link...) A lot of other blog posts around scream that MVC is better because its better. One even tries to posit the notion that some kind of score card approach can help you decide.
Mikesdotnetting - Sunday, February 21, 2010 8:21 AM
Pretty much every sample application that illustrates ASP.NET MVC uses Linq To SQL or the Entity Framework as the data access method. I've seen a number of questions posted to the forums at www.asp.net asking if there are any alternatives, and indeed there are. This article will look at using plain ADO.NET within a data access layer to provide dynamic content to a typical small CRUD application.
Mikesdotnetting - Wednesday, February 10, 2010 7:28 AM
The most recent addition to my Cheat Sheets features details of all the Exceptions that can be found in the most commonly used assemblies within ASP.NET development. Compiling this information was an interesting challenge. I could have simply copy-pasted from MSDN, but that would have been extremely tedious. Instead, I ended up with a blend of Linq to XML, Reflection, a dash of Regex and the Global Assembly Cache Tool - gacutil.exe. Here's the full story.