ASP.NET 1.x made great strides in simplifying form management and processing, but it did miss a couple points when it came to filling forms out using the keyboard. Fortunately these oversights were quickly noticed by users and Microsoft responded in ASP.NET 2.0 by adding the DefaultButton and DefaultFocus properties to the HtmlForm object.
While ASP.NET server controls make developing Web pages much simpler,
sometimes they don't output their HTML exactly the way you'd like them to.
That's where the Literal Web server control comes in. Unlike most
other controls, it doesn't add anything to the output.
Last week, Microsoft quietly released .NET Framework 2.0 Service Pack 1 and
.NET Framework 3.0 Service Pack 1. If your servers aren't configured to
install updates automatically, now might be a good time to check and
make sure you're up to date.
While the original version accomplished its task using string
functions, this version splits the phrase into an array of words and
then loops through the array capitalizing each word. It just goes
to show that no matter how simple a problem is, there's almost
always more than one solution.
Along with all the other updates in Office 2007, Microsoft has also
changed the file formats. Access now saves its data in .accdb files
instead of the familiar .mdb format. Luckily, with some updated
drivers and a few simple connection string changes, you'll be
connecting to the new files in no time.
It sure took Microsoft long enough to add decent style sheet support
to Visual Studio, but man was it worth the wait. This article
examines the new CSS capabilities available in Visual Studio 2008.
The Best of 2007
As we get ready to welcome 2008, here's a quick list of some of the best content of 2007:
For years I've been telling people that they shouldn't write any VB or VBScript code without first specifying Option Explicit. Well, times change and I no longer use Option Explicit. These days it's Option Strict.
There's no doubt about it, the fact that ASP.NET handles ViewState
for us is a godsend. That being said, this magic that ASP.NET gives
us does come at a cost. That cost is larger web pages... sometimes
surprisingly large.
One of the site's original samples gets a long overdue update.
Along with general code improvements and greatly improved HTML,
you'll also notice that the associated form now stays syncronized
with the calendar.
On Monday, Nov. 19, Microsoft announced that Visual Studio 2008 and
the .NET Framework 3.5 were released to manufacturing. With more
than 250 new features, Visual Studio 2008 includes significant
enhancements in every edition.
Whether you're trying to share settings between your ASP.NET and
classic ASP apps or are simply looking for a way to make your
eventual migration to ASP.NET easier, this piece of code might be
just the ticket.
It recently came to our attention that while most of our ASP.NET
sample code worked fine in the various different versions of the
.NET runtime, a few of the samples weren't overly happy in anything
but an ASP.NET 1.x environment. Since most of you have already
moved to .NET 2.0 or later, it seemed only right that we do the
same. All of our .NET sample code is now running live on version 2.0
of the .NET Framework.
One of our most frequently asked questions comes from our sample
script that lists files and folders on the web server's file system.
The question everyone seems to want answered is how do you write a
version of the script that will traverse sub-folders. It's really
quite simple... take a look at the code and see for yourself.
If you're looking for an ASP.NET version, we've got one of those as well.
It's not quite as
simple as its classic ASP counterpart, but it gets the job done just
as well.
Persisting form values in classic ASP may be a pain, but sometimes
it needs to be done. Luckily for you, this week we've got a sample
that shows you how.
This week we're back with an ASP.NET 2.0 version of
the script we published in answer to the question:
"When I'm sending an HTML
formatted email, is there a way to load my HTML from a file so I
don't have to deal with things like double quotes and vbCrLf
characters?"
One of our visitors recently asked "When I'm sending an HTML
formatted email, is there a way to load my HTML from a file so I
don't have to deal with things like double quotes and vbCrLf
characters?"
If you're anything like me, at times you probably get a little
overwhelmed by the amount of email you need to process. To help you
manage your mail, Microsoft Outlook offers you the ability to flag
messages with different status codes... the most common one being
"Follow up". But why should we have to set this flag ourselves?
This visitor submission displays a calendar in a pop up window so a
user can choose a date. Once that date is picked, the calendar
returns that value to the parent form.
So you're using ASP.NET... no problem. Here's an ASP.NET version
that illustrates how to set timeouts and handle the error that is
thrown when the remote server doesn't respond quickly enough.
This script is a version of our HTTP sample which is designed to
have the request time out in order to illustrate how to handle HTTP
timeout errors. It was written to demonstrate how to use the
WinHttpRequest object's SetTimeout method and handle the error it
throws when a timeout expires.
This sample uses ASP.NET to seach a text file for a user specified
query phrase. It displays the complete file being searched with the
search phrase highlighted and lists the line numbers on which the
search phrase was found at the bottom.
This sample shows you how to search a text file for a phrase.
As currently implemented, it displays the complete file being
searched with the search phrase highlighted and lists the line
numbers on which the search phrase was found at the bottom.