Browse by Tags

All Tags » c# (RSS)

Last GUID used up - new ScottGuID unique ID to replace it

You might have heard in recent news that the last ever GUID was used up. The GUID {FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF} was just consumed by a soon to be released project at Microsoft. Immediately after the GUID's creation the word spread around the...
Posted by Eilon | 42 comment(s)
Filed under:

Introducing SmartyRoute: A smarty-ier way to do routing in ASP.NET applications

Update 9/9/2012: Scott Hanselman has just blogged about the new Friendly URL system for ASP.NET Web Forms . It's a much fancier, and admittedly much smarty-ier way to do routing and other features for Web Forms. Also, that feature will be officially supported...
Posted by Eilon | 10 comment(s)
Filed under: , ,

The String or the Cat: A New .NET Framework Library

For years applications have been built that accept user input. Most user input starts out as a string. Strings are a universal representation of arbitrary data coming into a computer. However, most data does not remain as a string for very long. User...
Posted by Eilon | 52 comment(s)
Filed under: , ,

How to Allow Generic Controls in ASP.NET Pages

Did you ever want to have a Repeater<Customer> control on your page? And its events were all strongly typed to recognize that each row was bound to a Customer object? Well, I came up with a way of doing it using some lesser known features of ASP...
Posted by Eilon | 20 comment(s)
Filed under: , ,

Using C# 3.0 Anonymous Types as Dictionaries

During a design meeting for a new feature in ASP.NET we had a requirement that a new method accept a dictionary of name/values pairs. An obvious solution is to have the method accept a parameter of type IDictionary (or its generic cousin): public static...
Posted by Eilon | 76 comment(s)
Filed under:

Changing the request culture for globalization and localization

In ASP.NET 2.0 we added several new features to make globalizing and localizing an application easier than ever before. One of the coolest features is the ability to declaratively localize entire controls as well as individual properties of controls....
Posted by Eilon | 5 comment(s)

Testing your ASP.NET control (part 1 of hopefully many): ViewState

A typical ASP.NET server control will store at least some of its properties in ViewState. For example, the Label control saves the value of its Text property in ViewState so that on following postbacks the value does not need to be explicitly set again...
Posted by Eilon | 3 comment(s)
Filed under: , ,

Using ObjectDataSource to do the dirty work for your custom data source

Since ASP.NET 2.0 was released in 2005 many of you have taken advantage of the new data source control controls . Drop a GridView on the page. Bind it to a data source. Check a few checkboxes. Run the page. Go home early! However, some of you want to...
Posted by Eilon | 17 comment(s)
Filed under: , ,

Attributes to consider applying when writing a custom control

Almost every custom control has at least one additional public property, and that public property as well as the control itself should probably have at least a few attributes applied to them. Attributes tell the designer host (Visual Studio) or the parser...
Posted by Eilon | 5 comment(s)
Filed under: ,

From the Suggestion Box: Reusing object instances with ObjectDataSource

From the suggestion box Marc Brooks asks: "More about the needed fixes for ObjectDataSource (e.g. allowing it to acquire the object instead of creating exnilo)." In fact, the ObjectDataSource already supports this functionality through its ObjectCreating...
Posted by Eilon | 4 comment(s)
Filed under: , ,
More Posts