A collection of articles and tutorials on web development with ASP.NET by Mike Brind

Latest Entries

How to make an ASP.NET Table row highlight and become clickable

06 May 2007 20:38

C# ASP.NET 2.0 Javascript HTML

For those people who like to output their data to an asp:Table, highlighting the entire row and making it clickable can make it obvious to the user that some action is expected from them. This emulates the behaviour that can be found in some desktop applications. All that's needed for this is a bit of javascript, and the use of AddAttributes() for the table rows.

Click to read more about How to make an ASP.NET Table row highlight and become clickable ...

Viewed 92427 times

4 Comments for this item

How to center the content of a web page

05 May 2007 20:48

HTML CSS

This question gets asked very often in the forums and newsgroups, and is very easy once you know how.

Click to read more about How to center the content of a web page ...

Viewed 31383 times

4 Comments for this item

How to force a scrollbar for centered web pages

05 May 2007 20:45

HTML CSS

If you have centered web pages, there can be times where the depth of content doesn't reach the bottom of the window browser, so no scroll bar appears. Navigating between long and short pages can give the appearance of the centered content "jumping" from side to side.

Click to read more about How to force a scrollbar for centered web pages ...

Viewed 7757 times

0 Comments for this item

Include contents of an html page in an aspx page

05 May 2007 20:44

ASP.NET 2.0 HTML

If you are creating a new ASP.NET application, but have a huge collection of existing content in html files, one option is to move all the content into a database and generate pages dynamically. However, migration to a database can be a time-consuming task depending on the volume of content. So wouldn't it be easier to somehow import the relevant parts of the existing html pages into your aspx page?

Click to read more about Include contents of an html page in an aspx page ...

Viewed 68411 times

5 Comments for this item

Javascript 24 hour clock

01 May 2007 22:54

Javascript

A snippet for a javascript clock showing time in 24 hours with seconds

Click to read more about Javascript 24 hour clock ...

Viewed 22096 times

1 Comment for this item

Parameter Queries in ASP.NET with MS Access

13 April 2007 22:17

ASP.NET 2.0 MS Access ADO.NET

A selection of code samples for executing queries against MS Access using parameters.

Click to read more about Parameter Queries in ASP.NET with MS Access ...

Viewed 208392 times

48 Comments for this item

Paging long articles in ASP.NET using C#

09 April 2007 21:44

C# ASP.NET 2.0

Long articles are better broken into bite-sized chunks over several pages. With static HTML, this is easily achieved by dividing the article into logical separations and creating separate .htm files for each. Here's how to do it using C# for an article that gets posted to a database.

Click to read more about Paging long articles in ASP.NET using C# ...

Viewed 20375 times

3 Comments for this item

Regular Expressions and VBScript

09 April 2007 12:42

Classic ASP VBScript

Regular Expressions provide a much more powerful and efficient way of manipulating strings of text than the use of a variety of standard string functions. They have a reputation of being cryptic and difficult to learn, but are actually quite easy to learn and use.

Click to read more about Regular Expressions and VBScript ...

Viewed 121319 times

3 Comments for this item

Date Formatting in C#

08 April 2007 21:11

C# ASP.NET 2.0

Cheat sheet detailing formatting options for dates and times in C#.

Click to read more about Date Formatting in C# ...

Viewed 311954 times

39 Comments for this item

Date formatting in VBScript

08 April 2007 20:22

Classic ASP VBScript

A cheat sheet for people who want to format dates using VBScript

Click to read more about Date formatting in VBScript ...

Viewed 209446 times

8 Comments for this item

Migrating from Classic ASP to ASP.NET - equivalent objects and classes

07 April 2007 10:01

Classic ASP VBScript ASP.NET 2.0

Having spent some time familiarising oneself with the objects available in Classic ASP, it can be tricky sometimes to find the .NET framework equivalent. Here's a guide.

Click to read more about Migrating from Classic ASP to ASP.NET - equivalent objects and classes ...

Viewed 19202 times

1 Comment for this item

How to retain carriage returns or line breaks in an ASP.NET web page

06 April 2007 19:55

C# ASP.NET 2.0 HTML

Many newcomers to web development cannot get their head around why the carriage returns they made in their data on input from a textarea, or from a text file, Excel spreadsheet etc. do not appear when the web page renders.

Click to read more about How to retain carriage returns or line breaks in an ASP.NET web page ...

Viewed 176139 times

28 Comments for this item

Create an RSS Feed In ASP.NET 2.0 C#

05 April 2007 22:37

C# ASP.NET 2.0

Using the XmlTextWrite to output an XML file that serves as an RSS feed.

Click to read more about Create an RSS Feed In ASP.NET 2.0 C# ...

Viewed 15484 times

2 Comments for this item

How to conditionally show an image, or other control in ASP.NET

04 April 2007 21:45

ASP.NET 2.0

Quite often, you want to display an item from a database that may or may not have an associated image. Examples might include a news story, product details, car for sale etc. But you want to avoid the dreaded "redex" if a picture isn't present.

Click to read more about How to conditionally show an image, or other control in ASP.NET ...

Viewed 43818 times

5 Comments for this item

Recent Comments

Pam 30/08/2017 11:30
In response to Sending Email in Razor Pages
Mike, RazorPages sound like a nice choice for somebody still working in ASP classic who wants to to...

Robby Robson 15/08/2017 00:43
In response to Routing in Razor Pages
Mike: great stuff. Now that .Core Standard 2.0 is formally out, how soon will you rewrite your book...

Satyabrata Mohapatra 28/07/2017 08:59
In response to Sending Email in Razor Pages
Bit off topic, but congratulation sir for your MVP award. You deserve it !!!...

Satyabrata Mohapatra 23/07/2017 16:43
In response to Razor Pages - The Elevator Pitch
@Dale Severin You can continue to build apps using asp.net web pages....

Satyabrata Mohapatra 23/07/2017 16:40
In response to Sending Email in Razor Pages
Thanks for sharing...learned a lot...

Gfw 22/07/2017 11:53
In response to Sending Email in Razor Pages
Question... Does System.Net.Mail support SSL?...

Dale Severin 20/07/2017 03:38
In response to Razor Pages - The Elevator Pitch
I work with razor web pages extensively. I appreciate the rapid development it permits me to I am as...

Obinna Okafor 14/07/2017 01:19
In response to Routing in Razor Pages
Thank you, Mike. Good post....

Satyabrata Mohapatra 11/07/2017 16:02
In response to Routing in Razor Pages
Very powerful routing system!!...

Cyrus 05/07/2017 03:41
In response to Razor Pages - Getting Started With The Preview
How can I trim packages and services as much as possible to use just razor pages? I don’t want to to...