December 2005 - Posts
One of the cooler features I like in Generics is type inference. Type inference allows you to call a generic method just as you would a non-generic method using its method signatures as references to the type(s), instead of specifying the type(s). VB.NET
Read More...
If you have a .NET 1.x project and are thinking about upgrading it to 2.0, take a look at Breaking Changes in .NET 2.0 Framework first, as there is a comprehensive listing of changes that could break your application upon upgrade. Share this post: email
Read More...
.NET 2.0 introduces XML comments to VB.NET 2.0. An XML comment starts with ''' (3 single quotes). While this is new to VB.NET 2.0, XML comments have been a supported feature of C# since version 1.0. On a side note, C# XML comments start with ///. '''
Read More...
One of the key features that I like most in Visual Studio 2005 is the built-in support for refactoring. This is how easy it is to extract a method. Visual Studio takes care of all the "dirty" work. Highlight and right-click the code you want to extract
Read More...
For some reason I'm not able to access public properties that I declare in a MasterPage, even though it is supposed to work. So, I discovered a way around it was to use FindControl. The example below demonstrates accessing a Literal control with an ID
Read More...
Need to access an HttpContext object in a class, but can't because the class doesn't inherit System.Web.UI.Page? Here is a simple helper class that will allow you to access some of the most common HttpContext objects. C# using System; using System.Web;
Read More...
EasyListBox 3.0 is here
If you've been waiting for a listbox control that does it all without making you work late... here it is. EasyListBox is back and better than ever. Here are some new features that make ELB 3 the perfect gift idea for that stressed-out programmer: >
Read More...
This is a common issue even with the DataGrid control. PostBack is invoked and your GridView doesn't update or, in some cases, disappears. All you need to do is force the GridView to bind to its datasource by calling the DataBind() method, GridView.DataBind(),
Read More...
I love mysteries. However, this one is pretty simple. Q: What is wrong with the following generic type? VB.NET Public Class BaseClass( Of K, V) End Class Public Class SubClass1 Inherits BaseClass( Of K, V) End Class Public Class SubClass2 Inherits BaseClass(
Read More...
If threaded components can reside in apartments, then where do the wealthy threaded components live? Mansions? Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Read More...
A couple of days ago I discovered MagicAjax. MagicAjax simplifies creating Ajax enriched content. So, how do you use MagicAjax? Click here to download MagicAjax. Step 1 Add a reference to the MagicAjax assembly to your project or a copy of it to the bin
Read More...
C++ Templates and .NET Generics are not the same. There are many differences between them, but the biggest thing that sets them apart is that C++ Templates are instantiated at compile-time while Generics are instantiated at run-time. Since C++ Templates
Read More...
I came across a thread on one of my lists today in which somebody was having problems running 2 different versions of the FreeTextBox assembly in the same /bin directory. The answer to this one is pretty simple. You need to install all versions of the
Read More...
Another common question I see on forums and lists is how to get the content of a GridView cell when in Edit mode. The following code demonstrates how to get the text of a cell at index position 3 using an OnEditing event. VB.NET Private Sub GridView_RowEditing(
Read More...
A common DropDownList issue I've seen on many forums and lists is about a DropDownList populating items 2x or not being able to get the selected value on postback when binding to a data source. This is due to the DropDownList having data bound to it again
Read More...
Came accross a funny post on the ASP.NET forums. Good stuff. http://forums.asp.net/1103287/ShowPost.aspx R Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Read More...
What is parametric polymorphism? It sounds like such a cool phrase. Parametric polymorphism is a function or datatype that can be written generically so that it can deal equally well with any objects without depending on their type. .NET Generics are
Read More...
There's all sorts of holiday goodies from Gmail: Contact groups, vacation message, mobile Gmail, and RSS feeds. Please visit http://mail.google.com/mail/help/about_whatsnew.html for an up-to-date list of Gmail goodies. R Share this post: email it! | bookmark
Read More...
Today I was the #1 Most Active User on the ASP.NET forums with over 100 posts. Not bad for my second day on the forums. Yup. That's me, StrongTypes. R Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Read More...
Here is an article that has an example of using Generics with a BLL: http://blogs.wwwcoder.com/amachin/archive/2005/02/28/1993.aspx R Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Read More...
What does the next version of Visual Basic (9.0) have to offer? Microsoft has an overview of VB 9.0 at http://url123.com/mdgb5 . R Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Read More...
I just answered a post on one of the lists I am a member of that asked how to use pointers in C#. Using pointers in C# is a very bad idea. Pointers reference a location in memory. If the garbage collector is called, the location of an object in memory
Read More...
Here is my latest article in which I discuss the use of the using statement in C# and VB.NET. Using Statement Article R Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Read More...
Here's another cool .NET Generics blog entry. This one is about Generic type parameter variance in the CLR: http://blogs.msdn.com/rmbyers/archive/2005/02/16/375079.aspx . R Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live
Read More...
Earlier I posted about C# Version 3.0 . I found this blog entry on C# 4.0 (codenamed Yoda) - http://blogs.msdn.com/mattwar/archive/2005/10/09/479008.aspx . R Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Read More...
Here is an interesting blog entry on the limitations of Generics polymorphism: http://www.geekswithblogs.net/michelotti/archive/2005/12/05/62273.aspx . R Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Read More...
Right now there are only two books out there that cover Generics, and out of the two only one is dedicated to Generics. I ordered Professional .NET 2.0 Generics last week and it should be arriving in the mail any day now. I am in the process of reading
Read More...
The .NET Framwork 2.0 introduces Eval() . Eval() is a shortcut for Container.DataItem() . Since Eval() uses Reflection, it causes overhead. From a optimization standpoint, it is better to use Container.DataItem() . VB.NET Container.DataItem() C# DataReader:
Read More...
I just published an article on Generic Collections. It demonstrates a basic use of a Generic collection as well as compares non-Generic and Generic collections. Generic Collections Article R Share this post: email it! | bookmark it! | digg it! | reddit!
Read More...
C# Version 3.0 Specifications
Have you ever wondered what the next version of C# (3.0) has to offer? Microsoft has published the specifications and they can be downloaded at http://tinyurl.com/baoh8 . R Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live
Read More...
Lets say you have multiple DataKeys assigned to the DataKeyNames property of the GridView control where only one DataKey will have a value and the rest will be null. Based on the non-null value, you want to trigger a conditional. I've discovered an easy
Read More...
I just published a new article on LearnAsp.com that demonstrates using a Generics List Collection in C# to store the retrieval of all folders, subfolder, and folders within subfolders. Folders File System Article R Share this post: email it! | bookmark
Read More...
O DataKeyNames, Where Art Thou?
The GridView control has a cool feature that allows you to bind more than one value as a DataKey. However, the documentation that I could find on how to get a DataKey other than the primary key was sparse. I finally discovered: VB.NET GridView.DataKeys(Index1).Values(
Read More...
I'm in love with KeePass. KeePass is an opensource password management safe. No more forgotten passwords for me. KeyPass website: http://keepass.sourceforge.net/ Screenshot (click for larger image) R Share this post: email it! | bookmark it! | digg it!
Read More...
Gmail keeps adding on the features. They just added virus scanning: http://mail.google.com/mail/help/about_whatsnew.html R Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Read More...
Here is something that many people may not know about GridView paging: Interface paging, the method of paging used by the GridView control, causes all your data to be loaded into memory at the time the data binds to the GridView. This means that if you
Read More...
Group
( Of Experts) I have created a Yahoo! group called StrongTypes. The focus of StrongTypes is to discuss and provide free, friendly, expert help in the area of .NET Generics. Visit StrongTypes and get your .NET Generics questions
Read More...
I discovered that the GridView lacks a feature when it comes to sorting. What if you are using a DataSource such as SqlDataSource, but you don't want to sort the GridView using the same SelectCommand statement that was used to bind the GridView to its
Read More...
Today I spent 8 hours trying to figure this one out. I was using a CommandField control with ShowDeleteButton="true" in a GridView to handle deletion of records from a database table. Under certain circumstances, it caused a runtime exception. The only
Read More...