Geeks With Blogs

AzamSharp Some day I will know everything. I hope that day never comes. May 2006 Entries
Migration Problems from Visual Studio.NET 2005 to Web Application Project
Well, call me crazy but I decided to migrate from Visual Studio.NET 2005 WebSite to Web Application Project. It was a bad decision as now I am facing annoying errors. Check out the error below which is thrown because of the Login control. Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.Compiler Error Message: CS0030: Cannot convert type 'ASP.login_aspx' ......

Posted On Wednesday, May 31, 2006 8:15 PM

Saving User Interface Messages in an XML File
Most of the time you need to display messages to the user which represents the state of their request and action that happened to the request. Messages Like "Data has been inserted", "User has been deleted" etc. It is always a good idea to put all those messages in an XML file so you can easily change it in the future. One other advantage of using the XML file is that you don't need to build your application if you change any message. Here is a little code snippet I wrote that returns the message ......

Posted On Tuesday, May 30, 2006 9:01 PM

How do you deal with questions in your inbox??
I am wondering that how do you developers deal with questions that comes in your inbox. Questions like how can I export data from the GridView to asking about the three tier achitecture. Do you email the person back with the consulting rates or do you simply answer all those questions? What about recieving 20-30 questions each day how can you answer all of those? Will the paid consulting kicks in at this point?? powered by IMHO 1.3 ......

Posted On Monday, May 29, 2006 10:30 PM

In San Antonio!!!
Hi Everyone, I just wanted to tell everyone that I will be in away from my computer for 2-3 days and will not be able to answer any posts on GridViewGuy. Currently I am in San Antonio enjoying the long weekend. I will be back in the GEEK MODE on Wednesday. Take care everyone and have a great holidays. powered by IMHO 1.3 ......

Posted On Sunday, May 28, 2006 10:15 PM

Securing Confidential Strings in ASP.NET 2.0
How do you keep your confidential strings, confidential? Let's say that you get the password from the user and you need to send the password between different layers. It is not a good idea to play around with the password without encryption. In ASP.NET 2.0 Microsoft introduces SecureString class which can be used to encrypt the string. Check out the code below which shows how you can encrypt and decrypt the strings. public static SecureString EncryptedPassword(string password) { SecureString secureString ......

Posted On Thursday, May 25, 2006 12:43 PM

Unit Testing Layer
We all are familiar with the layered architecture which represents the different layers of the application. Most of the application consists of the 3 layer architecture which includes Presentation Layer, Business Layer and the Data Access Layer. Since, Unit Testing is extremely beneficial for the developement of the application I think it should be considered a layer. This means that along with the 3 layer there should be one more layer added to the application which will be known as the Unit Testing ......

Posted On Thursday, May 25, 2006 12:36 PM

Visual Studio.NET 2005 A BIG DISAPOINTMENT!!!!
I am so fed up with Visual Studio.NET 2005. First of all it is slow as hell, It makes me feel that I am using a computer developed in the 80's. It compiles each page into an assembly !!! Not sure who was the genius behind this idea. Then they came out with Web Application Project which has the same compilation model as Visual Studio.NET 2003 had. Okay good enough but how should I install it. Whenever I try to install it says you have previously versions already installed on your machine. Okay, fair ......

Posted On Thursday, May 25, 2006 12:30 PM

My Wish List :)
Finally, its time for my wish list. I recently graduated in december 2005 and as a student spent 4 years of my life in very crappy apartment (Actually I am still living there but will be moving out in July). Being an international student you have to pay tons of fees and I never asked anyone for money and arranged everything on my own. For that reason I did not buy a car for 4 years. Finally, 1 week ago I purchased a car and I am very happy with it. Now, I am doing a full time job although the pay ......

Posted On Tuesday, May 23, 2006 6:10 PM

Accessing different controls inside the FormView control
FormView is a template databound control which can contain other controls inside it. It is a common practice to access different controls inside the FormView control. In the code below I have populated the DropDownList, CheckBoxList and the ListBox control and all of these controls reside inside the FormView control. Take a look at the complete code below: using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;u... ......

Posted On Monday, May 22, 2006 11:34 PM

Populating the DropDownList inside the FormView Control
FormView control is a template control and hence it allows other controls to be embedded inside it. You can also place a DropDownList control inside the FormView control. The code below populates the DropDownList control which is placed inside the FormView control. private void BindData() { SqlConnection myConnection = new SqlConnection(ConnectionStr... SqlDataAdapter ad = new SqlDataAdapter("SELECT * FROM Users", myConnection); DataSet ds = new DataSet(); ad.Fill(ds); fv1.DataSource = ds; fv1.DataBind(); ......

Posted On Monday, May 22, 2006 10:18 PM

Exporting GridView to excel which is inside FormView control
Few days ago someone asked me that how we can export the GridView control to Excel. The GridView control is inside the FormView control. Check out the complete code below for the solution. using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;u... System.Web.UI.WebControls.W... System.Web.UI.HtmlControls;... System.Data.SqlClient;public partial class _Default : ......

Posted On Monday, May 22, 2006 6:57 PM

Sorting DataTable Double Columns
If you are sorting the DataTable and the DataTable contains the data type "Double" column then in order to sort the column in correct order you need to specify that the column is "Double". This is because by default the columns are sorted by using the string comparison. After specifying the double column you can simply pass the DataTable to the DataView object and sort the DataView. powered by IMHO 1.3 ......

Posted On Sunday, May 21, 2006 11:04 AM

Changing GridView Column Color
Couple of weeks ago I wrote two articles which explained column sorting scenario for the GridView control. I explained sorting bound columns and also auto-generated columns. One important point which I left out was how to remember that which column was sorted. Consider a scenario in which you have 10 columns and you sort the GridView by using one column but after some time you forgot that which column was used for sorting. In this article I will explain that how you can change the column color of ......

Posted On Wednesday, May 17, 2006 9:39 PM

Keeping track of the changes in the database
I was wondering that how do you keep track of the changes you make in the database of the application. These changes can be adding a new SPROC, adding a new field in the table, modifying a SPROC and modifying the field in the database table. powered by IMHO 1.3 ......

Posted On Monday, May 15, 2006 10:05 AM

ATLAS UpdatePanel + AdRotator + ATLAS Timer Control
One good use of the ATLAS UpdatePanel control and the Timer control is that you can change the Ads displayed by the AdRotator control without doing the POSTBACK. The best thing is that it is pretty simple. Check out the following code: <form id="form1" runat="server"> <div> <atlas:ScriptManager ID="sm1" runat="server" EnablePartialRendering="true" /> <atlas:TimerControl ID="tm1" runat="server" Enabled="true" Interval="5000"> </atlas:TimerControl> <atlas:UpdatePanel ......

Posted On Saturday, May 13, 2006 11:47 PM

Using different languages in a .NET project
I get asked this question a lot that what are the advantages of using different languages in the .NET envirnment. The .NET framework does not care what language you use and compiles the code into the IL (Intermidiate Language). From there the IL is converted to the native assembly code. The main advantage of using different languages is to give the developer more flexibiltiy in creating the application. The VB (VB6) developer might be more comfortable with the VB.NET syntax and can create cool UI ......

Posted On Friday, May 12, 2006 8:24 PM

ATLAS Control Toolkit Updated (RoundCornerExtenderControl)
I really like the RoundCornerExtenderControl which is part of the 4 new controls introduced in the ATLAS Control Toolkit. You can make round corners of different controls and make them cooler by simply using the RoundCornerExtenderControl. Check out the code below which make round corners for two <td> cells. <table> <tr> <td id="td1" style="background-color:Red" runat="server"> This is the first message </td> </tr> <tr> <td> <table> <tr> ......

Posted On Wednesday, May 10, 2006 6:17 PM

How do you manage your tasks?
One thing that is very important to all the developers is to manage the tasks. These tasks include reading about some new material or playing around with new technology or even looking into some code. All these tasks are performed maybe later in the day and at that time we lost the count and even the names of the tasks performed. How do you maintain a list of tasks to be done? Do you write it on a piece of paper and put it in your pocket? Do you have a special software which you use? powered by IMHO ......

Posted On Wednesday, May 10, 2006 8:57 AM

Working With ATLAS Control Toolkit
My new article Working With ATLAS Control Toolkit has been published on www.aspalliance.com. You can view the article at this link. In this article I talked about that how you can use the CollapsePanel and ConfirmButton control. powered by IMHO 1.3 ......

Posted On Monday, May 8, 2006 11:37 PM

First Look at ATLAS Control Toolkit
My new article First Look at ATLAS Control Tookkit has been published on www.aspalliance.com. You can view the article at the this link. In this article I developed a simple contact list application from scratch and later injected ATLAS to make the application more user friendly and responsive. powered by IMHO 1.3 ......

Posted On Monday, May 8, 2006 8:50 PM

Access GridView Invisible Columns
I have just published an article on how you can access invisible columns inside the GridView control. You can view the article at this link. powered by IMHO 1.3 ......

Posted On Sunday, May 7, 2006 9:14 PM

Magic AJAX Article Published on WWW.ASPALLIANCE.COM
Couple of days ago I wrote an article on MAGIC AJAX Library. The article has been published on www.aspalliance.com and can be viewed at Working with Magic AJAX. powered by IMHO 1.3 ......

Posted On Sunday, May 7, 2006 8:15 PM

Unit Testing Poll on www.asp.net
ASP.NET has openned a poll to ask the developers about their usage (if any) on the Unit Testing. Amazingly 45.63% of the developers are not aware of the Unit Test. And 31.88% of the developers have not implemented the Unit Tests in their application. This all leads to the quality of the product. Since, most of the above mentioned developers have not implemented Unit Tests, the probablity of bugs in the application is pretty high. What are Unit Tests? Unit Tests are created before a single line of ......

Posted On Friday, May 5, 2006 10:54 AM

Security Trimming in SiteMaps
Security Trimming attribute in the SiteMap is a pretty cool feature to hide the links which are not approachable by the user of the desired role. Yes, I think "NOT APPROACHABLE" is the correct word as most of the people think about security trimming feature in a different way (THE WRONG WAY). Check out the Web.config settings of the Site Map below: <siteMap defaultProvider="XmlSiteMap... enabled="true"> <providers> <add name="XmlSiteMapProvider" type="System.Web.XmlSiteMap... ......

Posted On Tuesday, May 2, 2006 10:21 PM

Copyright © Mohammad Azam | Powered by: GeeksWithBlogs.net