Extending Gridview for ASP.NET 2.0

23. May 2006
Sorting columns displayed with images in the header : http://aspalliance.com/666 - Sample code can be downloaded. Another sample to group rows from selected sort column : http://asyncpostback.com/05_OtherSamples/02_GridViewGroupedSorting.aspx Row clickable gridview : [for server postback] http://aspadvice.com/blogs/joteke/archive/2006/01/07/14576.aspx or [client side action] http://www.gridviewguy.com/ArticleDetails.aspx?articleID=174 Gridview sample with Atlas (Task list) : http://weblogs.asp.net/scottgu/archive/2005/12/26/433997.aspx Master/Detail for Gridview with javascript : http://www.codeproject.com/aspnet/MasterDetail.asp?df=100&forumid=254259&exp=0&select=1430411 Managing Datatable from client : http://aspadvice.com/blogs/garbin/archive/2006/03/05/15591.aspx  

.NET Projects

A lire si vous utilisez javascript…

23. May 2006
5 javascripts vraiment utiles : http://developpeur.journaldunet.com/tutoriel/dht/060512-5-javascripts-vraiment-utiles.shtml  Quelques fonctions sympas : http://blogs.wdevs.com/Sukumar/archive/2005/05/10/3335.aspx

Javascript, css ,

Want state led images ?

22. May 2006
It could be useful…so, I share it !!!      That’s all

.NET Projects

Which collection type to use in .NET 2.0 ?

19. May 2006
Generic Class Description Non-Generic Counterpart BindingList<T> List that supports complex data-binding scenarios None Collection<T> Provides the base class for a generic collection CollectionBase Comparer<T> Compares two objects of the same generic type for sorting Comparer Dictionary<K, V> A collection of key/value pairs Hashtable IEnumerable<T> A collection that can be iterated using a for-each statement IEnumerable KeyedCollection<T, U> A keyed collection KeyedCollection LinkedList<T> A doubly linked list None List<T> The base class for a list ArrayList Queue<T> A FIFO collection of objects Queue ReadOnlyCollection<T> The base class for a generic read-only collection ReadOnlyCollectionBase SortedDictionary<K, V> A collection of key/value pairs sorted by key SortedList Stack<T> A simple LIFO collection of objects St... [More]

.NET Projects

Assembly visible under visual studio references

16. May 2006
By default, a assembly (you created) is not visible in the visual studio project’s references…even if it is in the GAC. You can add directories to the registry to specifiy to VS where to search your assemblies : Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\MyAssemblies]@="C:\\MyAssembliesPath\\" To use this code : Change ‘MyAssemblies’ by your contextual name. Change ‘MyAssembliesPath’ by your contuextual file system path. Create a .reg file, insert the code …and double click. For information, if the assembly is in the GAC, you should have a copy placed (for example) in the ‘Program Files\MyAssemblies’ directory.So, your setup project can create this copy and auto-reference it in the registry.  

.NET Projects, Developer Tools ,

Validate XML with XSD

15. May 2006
To validate an XML file with an XSD file, use this ! public static XmlDocument ValidateAndLoadXmlDocument(string xmlFilePath, string xsdFilePath){ XmlDocument xmlDoc;XmlReaderSettings xmlSettings = new XmlReaderSettings();xmlSettings.Schemas.Add(null, xsdFilePath);xmlSettings.ValidationType = ValidationType.Schema;XmlReader xmlReader = XmlReader.Create(xmlFilePath, xmlSettings);xmlDoc = new XmlDocument();xmlDoc.Load(xmlReader);return xmlDoc; } Use this for asynchronous validation : xmlSettings.ValidationEventHandler += new ValidationEventHandler(YourValidationEventHandler);  

XML, Web Services, .NET Projects , ,

Remove nodes from xml document

13. May 2006
If you need to remove nodes from an xml document, here is an example. This sample clean duplicated nodes and only keeps the last one (according to the date field).    Source.xml (the file to filter)    <?xmlversion="1.0"encoding="utf-8" ?> <Root>     <Products>       <Product>         <Name>Product1</Name>         <DataGroup>           <Data>             <Name>NABC</Name>             <Value>VABC</Value>             <Date>2006-01-10 </Date>           </Data>           <Data>             <Name>NADF</Name>             <Value>V... [More]

XML, Web Services, .NET Projects , ,

Use the Visual Studio 2003’s project structure in Visual Studio 2005

12. May 2006
I was happy to learn that the old project structure of Visual Studio has come back in 2005 with the advantages of MSBuild ! It is delivered as a new project type called “Visual Studio 2005 Web Application Projects”.  Moreover, it includes a ‘Edit and continue’ compilation directive to edit code while executing in debug mode and continue execution with changes. This feature works for web applications and the libraries executed in web projects.  For details, read this post : http://weblogs.asp.net/scottgu/archive/2006/05/08/445742.aspx To download, go here : http://msdn.microsoft.com/asp.net/reference/infrastructure/wap/default.aspx  

.NET Projects, Developer Tools ,