Geeks With Blogs
AzamSharp Some day I will know everything. I hope that day never comes. June 2005 Entries
Driver License Exceptions
Today I went for my driver license. This was the 4rth time I went to the Driver License Office. I know you must be wondering that I failed three times before but the story is completly different. Attempt 1: Failed the Eye Exam // got the geeky glasses Attempt 2: Passed the eye exam and aced the written Exam. Got the permit. Attempt 3 (Road Test): Did not took SSN Card to the driver license office and was not allowed to take the road test. They are soo stupid to even ask me for SSN card, since I have ......

Posted On Thursday, June 30, 2005 3:34 PM

Professional DotNetNuke Portal Starter Kit
I just recieved Professional DotNetNuke Portal Starter Kit and started skimming it through. The book is mainly about administration and not the development of the DotNetNuke. They assume that you have dotnetnuke ( which offcourse you can download it from for free ) and want to administer it. I was hoping the book would cover the development details like classes used and database design issues. I guess the best way is to download DotNetNuke and see the source code that what's ......

Posted On Wednesday, June 29, 2005 4:18 PM

Annoying emails should we reply or neglect ?
Everyday I recieve emails saying "I read your article on certain website and I am having trouble solving this problem can you please email me the solution as soon as possible". Most of the time I email them a link which contains the solutions but seems like that they are never happy. They are code hunders and need code :). Even if I give them few lines of code they will email you back the whole code with new requirement. Sometimes you get the feeling that you are their employee, unfortunatly you ......

Posted On Wednesday, June 29, 2005 2:54 PM

Exporting datagrid to Excel and Text File
Few weeks ago I had to write some code to export datagrid to excel and text file. When I accomplished the task I decided to write an article on it so it can help other developers who are seeking the solution. I got lot of helped from for finding the solution and now I want to share this with everyone. You can view my complete article on my website : DataGrid Export to Excel and Text File Enjoy !

Posted On Wednesday, June 29, 2005 1:10 PM

Binding simple html hyperlink with datasource
Today I had to bind a simple html hyperlink control with a datasource so that user can click on the hyperlink and default mail client will start. This was very simple all I had to do is use the Asp tags in html and assign the correct properties to it. Here is the code:
 <%# DataBinder.Eval(Container.DataItem,"Author.Name") %>

Posted On Tuesday, June 28, 2005 12:21 AM

Creating menus with xml file
Static menus should always be stored in an xml file instead of a databases. This will increase performance and will save trips to the database. Here is a nice way to access the contents of the xml file which contains the "Name" and the "Url" of the menu items. I have also used Caching so I only have to access the file when its contents are changed. private const string MENU = "Menu"; private const string MENU_FILE = "Menu.xml"; private DataSet BuildMenu() { DataSet dsMenu = new DataSet(); if(Cache[MENU] ......

Posted On Sunday, June 26, 2005 10:55 PM

Inserting Articles by same author in the database ( SQL Stored Procedure )
I am working on a website where user can submit an article. I have two tables "Articles" and "Authors". Articles contains the information about article like Title, Description etc and Authors contains the name and email of the author. Each new article entry form has a field to enter the name and email of the author. If the user authors several article we don't want to make a new entry in the author's table since that author already exists. This stored procedure checks if the author already exists ......

Posted On Sunday, June 26, 2005 10:51 PM

Formatting DateTime field returned from the database
If you have DateTime field in the database and displays it on the page it will display something like this: 3/4/2005 12:00 AM Now if you only want to display the date part which means "3/4/2005" you can easily accomplish this:
 <%#  ((DateTime)DataBinder.Eval(Container.DataItem, "DateCreated")).ToShortDateString()%>

Here "DateCreated" is the name of the field in the database and we are simply converting the returned date into ToShortDateString format.

Posted On Saturday, June 25, 2005 9:24 PM

My Picture at Work :)
This is my first picture at work. I work at University of Houston as an & C# developer. Currently I am working on a student, staff, instructor portal. The basic idea behind the portal is that student can give exams online and get grades. Instructors can quickly make the whole exam by selecting wizard like screens. The application is huge spanning over 10 servers, 15 databases and over 150 tables and God knows how many stored procedures ......

Posted On Saturday, June 25, 2005 7:31 AM

Which editor you guys use to post on this BLOG
I am using notepad to post on this blog but having troubles. When I have have to make bullet list I use something like "*" but all of my points appear on the same line. For code snippets I use the html preformatted tag which is working good. Just wondering how you all guys post text. Ohh yeah I forgot to ask that is that possible that I paste a link and it appears as a link and not as plain text.

Posted On Thursday, June 23, 2005 10:31 AM

Best ways to learn new technology
Its always hard at first to get a good grasp on any new technology. A novice programmer always wonders that what is the best way to learn. In my case working on a personal project proved to be really good. Offcourse before that you have to read some good books that will give you an introduction to the technology. Apart from reading books asking questions on forms have also helps me alot. People from all over the world answer questions and express their views. When I started implementing ......

Posted On Thursday, June 23, 2005 9:43 AM

Mysterious problems slow me down during development
I hate nothing more than facing mysterious problems during development of a software. Most of the time these problems arise when using Visual Studio.NET 2003. A number of times Visual Studio just stop working. Sometimes when I debug it does not go to the required method. Don't even start me with debugging webservices. During webservices debugging my computer completly hangs up. It really sounds funny but it does happen and its really annoying. Has anyone of you encountered any mysterious problems ......

Posted On Wednesday, June 22, 2005 7:51 PM

Accessing values of different controls inside the Datagrid control
I have been asked infinite number of times that how do I access a value of a checkbox that is present inside the datagrid control. When I finish answering the question a new question pops up "How do I access dropdownlist value present inside datagrid control?". Instead of answering these questions separately I wrote an article which deals with accessing values of different controls inside datagrid. Following is a code snippet from my article: foreach(DataGridItem dgi in myDataGrid.Items) { TextBox ......

Posted On Wednesday, June 22, 2005 4:44 PM

Making wrong use of Session Variables
I have seen this so many times that people are making wrong use of Session variables. Storing live information into Session variables is not a good idea. Suppose that if I am running a website that displays stock information. I would never place stock information into a session variable since it has to be updated every now and then. Storing the information might save us trip to the database but it will always display outdated information to the user. The following code sample will always return stale ......

Posted On Wednesday, June 22, 2005 11:20 AM

Making a variable of System.ValueType
As we all know that all the primitive types like Int32, double etc comes from the System.ValueType class. Ever wonder that what will happen if you make a variable of System.ValueType. Try something like this: System.ValueType a; a = -0.33442; Response.Write(a.GetType()); // This will print double a = 2; Response.Write(a.GetType()); // This will print Int32 Basically it will take any form of primitive type that you will assign to it. pretty cool right :) ......

Posted On Tuesday, June 21, 2005 11:28 AM

Some of the best articles on from different resources.
Extensive Examination of User Controls Extensive Examination of the Datagrid control Understanding Session State Modes Mastering Entity Classes Formatting DateTime in Microsoft Code translator from C# to VB.NEt and to C# Request Validation - Preventing Script Attacks Unit Testing the Data Access Layer Retrieving images from database 2.0 Quickstarts Image Generation Service using 1.x SQL Injections ......

Posted On Tuesday, June 21, 2005 10:06 AM

My first post in my new Blog
I really like this .Text Blog. It's far better than I will post related information on this Blog. Visit my website at

Posted On Tuesday, June 21, 2005 12:13 AM

Copyright © Mohammad Azam | Powered by: