Posted by: Imar Spaanjaars at Wednesday, July 28, 2010 8:04:14 AM in:
JavaScript
Back in 2004, I wrote
an article about making a full table row clickable using JavaScript, so you could click anywhere in the table row to browse to a new page. That solution used quite a bit of in-line JavaScript to accomplish that task which adds to the size and complexity of the page. Since then, the JavaScript landscape has changed quite a bit with the introduction of JavaScript libraries such as
Prototype and
jQuery. Because my initial article is in the top 10 results for "
full row select javascript" on Google, I figured it made sense to write a new, cleaner and more modern version of it using one of those libraries: jQuery.
Read on ...
Posted by: Imar Spaanjaars at Sunday, October 26, 2008 1:57:51 PM in:
TFS
I have been trying to install Microsoft Team Foundation Server 2008 on a Virtual PC for a presentation I'll be giving in a couple of weeks. I must say, the installation process is not as easy as you'd hope. If you follow the installation guide to the letter there's a fair chance you can get things up and running on your first attempt to install TFS. If you can't make it work, there are many useful posts on internet forums on TFS that can help you out. However, in my case I wasn't having so much luck....
Read on ...
Posted by: Imar Spaanjaars at Saturday, January 14, 2006 5:46:40 PM in:
ASP.NET 2.0
In a
previous article I showed you how to use the ASP.NET 2.0 DefaultFocus and DefaultButton features inside a Master Page. You saw how you could use the
UniqueID of a control to pass the right control ID to the
WebForm_AutoFocus JavaScript method. In this short article, I'll show you how you can use another client side script method to dynamically switch the DefaultButton at run-time.
Read on ...
Posted by: Imar Spaanjaars at Thursday, November 03, 2005 8:41:33 PM in:
ASP.NET 2.0
You may be aware of the new
DefaultButton and
DefaultFocus properties that a few ASP.NET 2.0 controls, including the
HtmlForm have. These properties allow you to determine which button gets "clicked" when you hit enter on the page, and which form control gets the focus when the page loads. (If you're not familiar with them, check out this
MSDN help file) But how do you use this feature in a page based on a Master Page?
Read on ...
Posted by: Imar Spaanjaars at Saturday, May 14, 2005 3:31:51 PM in:
ASP.NET 2.0
Today I was experiencing unexpected 404 "The resource cannot be found" errors when working with Visual Web Developer 2005 Express Edition beta 2 in combination with the ASP.NET Development Server. No matter what I tried, and what file I tried to open, I kept getting the same error.
Read on ...
Posted by: Imar Spaanjaars at Saturday, February 26, 2005 4:48:08 PM in:
VS.NET 2003
When you try to create a new project in Visual Studio .NET 2003 on a network drive, you might get the following error:
The project location is not fully trusted by the .NET runtime. This is usually because it is either a network share or mapped to a network share not on the local machine. If the output path is under the project location, your code will not execute as fully trusted and you may receive unexpected security exceptions. Click OK to ignore and continue. Click CANCEL to choose a different project location.
You get this error because by default .NET framework does not fully trust network locations. It's easy, however, to grant this trust to your projects, or your entire Visual Studio Projects folder.
Read on ...
Posted by: Imar Spaanjaars at Saturday, February 12, 2005 9:09:07 PM in:
ASP.NET 1.x
If you use .NET Data Binding to bind data from a data source (like a DataSet) to a control (like a DataGrid or Repeater) you often want to know if the control contains any rows. You can then use this knowledge to, for example, hide the entire DataGrid and display a message with the text "No records found" instead. You can easily accomplish this with a DataSet, because you can retrieve the number of items in the DataSet using something like myDataSet.Tables[0].Rows.Count. But what if you use a DataReader like the SqlDataReader? This class does not expose a count property.... Fortunately, there is a way to work around this.
Read on ...
Posted by: Imar Spaanjaars at Saturday, February 12, 2005 5:47:19 PM in:
ASP.NET 1.x
Update: 06/11/2006
Due to a number of requests I received, I have added a VB version of the code example in this article
In many applications, it's common practice to use a client side dialog, like a message box, to ask the user for confirmation or display a message. For example, if you allow a user to delete, say, an article on your site, you better ask if they are sure they want to delete the item. Many people know they can add a confirmation box to standard HTML or classic ASP pages. However, the same trick is less well known for ASPX pages, but just as possible and easy to implement. This FAQ will show you a few different scenario's for adding a confirmation dialog to your ASPX pages.
Read on ...
Posted by: Imar Spaanjaars at Wednesday, January 05, 2005 4:56:34 PM in:
ASP 3.0
If you use any ADO constant, like adOpenForwardOnly etc, ASP has to know what adOpenForwardOnly really means. There are a couple of ways to tell ASP where to look for these constants.
Read on ...
Posted by: Imar Spaanjaars at Saturday, October 02, 2004 9:49:07 PM in:
ASP.NET 2.0
Update!! 05-24-2006 - Updated the old beta code to the RTM version of ASP.NET 2.0. Also updated the downloadable source file.
Uploading files in ASP.NET is easier than ever. All you need to do is add the new <asp:FileUpload> control to your page and write a bit of code that deals with the uploaded file once the page is posted back to the server.
Read on ...