Posted on October 5, 2009 by kalpeshshirodker
There comes a time when you need to get the absolute path to reference a file or some resource existing at some relative path of the website or web application. As things turned i was in need some of the similar functionality. The first thing that came to my mind was doing something similar :
//get [...]
Filed under: C#, Dot Net, How To, Technical | Leave a Comment »
Posted on September 23, 2009 by kalpeshshirodker
When weneed to persist a dataset object, usually what we do is use the WriteXml() method for the Dataset object. For most cases the default implementation works fine.
So
DataSet dsObj = GetDatasetObject();
dsObj.WriteXml(filename);
If while saving the dataset, a particular contained NULL values, that column information will not be outputted. So when you try to [...]
Filed under: C#, Dot Net, How To, SQL Server, Technical | Leave a Comment »
Posted on September 19, 2009 by kalpeshshirodker
Recently i came across a wierd problem while developing a web user control. I needed to persist some data across page postbackās. I took the ViewState approach, which had been used previously to do the same task.
I had thought that it would be easy as it had been done a multiple times earlier, but [...]
Filed under: C#, Dot Net, How To, Technical, Uncategorized | Leave a Comment »
Posted on September 12, 2009 by kalpeshshirodker
For quite some time now i have been intending to write about Enum with Flags attribute set. Enum with Flags attribute set allows the enum to be used as Bit flags where each bit signifies whether a particular option is set or not. When using this very powerful feature there is always a need to [...]
Filed under: C#, Dot Net, How To, Technical | Leave a Comment »
Posted on September 6, 2007 by kalpeshshirodker
When you design an application it always a good idea to split your code into different modules. Clubbing all the methods, objects which are related to each other together. Inadvertently you may have to define different classes to meet this objective. More often than not you would have separateĀ assemblies or DLL’s which contain this class [...]
Filed under: C#, Dot Net, Technical | 1 Comment »
Posted on August 6, 2007 by kalpeshshirodker
While developing in C# (or any programming language for that matter) you may invariably find your self in need of using overridden functions for accepting different no of parameters.
Let me illustrate with a small example:
Consider a case where you want to add some numbers, if you know how many numbers you are going to add before [...]
Filed under: C#, Dot Net, Technical | Leave a Comment »