Geeks With Blogs
AzamSharp Some day I will know everything. I hope that day never comes. January 2006 Entries
GridViewGuy Forums BETA I has been released
Wow! this weekened was really brutal. I worked all weekened on the forums and I am happy to say that GridViewGuy forums has been released. The forums are in BETA version (duhh!) so don't freak out if you see any bug. But offcourse when you find the bug please email me and tell me about it so I can fix it. You can visit the forums at www.forums.gridviewguy.com. come on start posting powered by IMHO 1.3 ......

Posted On Monday, January 30, 2006 12:37 PM

Debugging Tip!
I don't know if you already know this or not. But when you are in debugging mode and you see a yellow pointer moving to the lines which are being debugged. Now suppose that you are debugging and that yellow pointer is moving through your code and you just wanted to see on a particular line of code that what is the value of the variables. But since you were pressing F11 or F10 like crazy you passed that line. Now what do you do? Should you start the debugging once again and this time press F10 in ......

Posted On Friday, January 27, 2006 10:31 AM

DetailsView with SQLDataSource
I wrote a detailed article which show that how you can use the DetailsView control with SQLDataSource control. To check out the complete article please click on the following link: http://gridviewguy.com/Arti... powered by IMHO 1.3 ......

Posted On Tuesday, January 24, 2006 9:00 PM

DefaultButton and DefaultFocus in ASP.NET 2.0
ASP.NET 2.0 introduces DefaultButton and DefaultFocus properties. You can use the form tag to define the properties DefaultButton and DefaultFocus. Here is a small example. <form id="form1" defaultbutton="ButtonID" defaultfocus="TextBox1" runat="server"> The input controls in ASP.NET also exposes the DefaultFocus properties. The last control that call the Focus() method will be focused. powered by IMHO 1.3 ......

Posted On Tuesday, January 24, 2006 8:06 PM

Intellisense Lost When doing CrossPageUrl
This has happened a lot of times that Visual Studio.NET 2005 looses the intellisense support. Take a look at the code below it has completly lost the support for the intellisense and does not recognize CrossPage1 which is of type Page. public partial class CrossPage2 : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { if (PreviousPage != null) { CrossPage1 prevPage = PreviousPage as CrossPage1; if (prevPage != null) { } } }} powered by IMHO 1.3 ......

Posted On Tuesday, January 17, 2006 9:09 PM

Create CRUD Stored Procedures Automatically Using StoredProcBuilder
I have to admit that this is way cool. StoredProcBuilder is a FREE tool which you can use to create Stored Procedures for your tables. It will ask for prefix which you want to use for your stored procedures and with one click BAM it will create all the stored procedures for a particular database. Check out the link below and download it. http://www.ellkay.com/Store... powered by IMHO 1.3 ......

Posted On Tuesday, January 17, 2006 11:27 AM

Encryption Sections of Web.config in ASP.NET 2.0
You can easily encrypt sections of web.config in ASP.NET 2.0. In the code below I have encrypted the ConnectionStrings section of web.config. Also check out the complete article which also includes writing into configuration files dynamically and reading configuration settings. Configuration config = WebConfigurationManager .OpenWebConfiguration(Reque... configSection = config.GetSection("connecti... (configSection.SectionInfor... ......

Posted On Monday, January 16, 2006 11:56 PM

Advertise with GridViewGuy.com

Now you are place your ads on www.gridviewguy.com. For more details please visit www.gridviewguy.com.

Thanks,

powered by IMHO 1.3

Posted On Monday, January 16, 2006 11:51 PM

Goofy Talk in a Video Tutorial
I have just uploaded a very simple Video Tutorial on www.gridviewguy.com. This tutorial is simply a test tutorial in which I talked about "GridView and CheckBoxes". Check it out and let me know. And yes, I know I sound very goofy powered by IMHO 1.3 ......

Posted On Friday, January 13, 2006 9:26 AM

GridView In-Place Editing Using ObjectDataSource
I recently wrote an article in which I discussed how you can perform In-Place Editing using ObjectDataSource control. You can check out my article at the following article: http://gridviewguy.com/Arti... powered by IMHO 1.3 ......

Posted On Thursday, January 12, 2006 10:38 AM

Using ObjectDataSource Control With GridView
I recently published an article in which I described how you can do In-Place editing using GridView control with ObjectDataSource. You can view the complete article at the following link: http://gridviewguy.com/Arti... powered by IMHO 1.3 ......

Posted On Thursday, January 12, 2006 10:34 AM

Subscribtion Feature Added for GridViewGuy
I just added a subscription feature in www.gridviewguy.com (see the link on the left menu). Now you can subscribe to the latest articles and recieve an email whenever a new article is added to the website. Here is the direct link to the subscribtion page. http://gridviewguy.com/Subs... Thanks, powered by IMHO 1.3 ......

Posted On Tuesday, January 10, 2006 5:11 PM

Gettting Column Value Using Checkbox in GridView Autopostback = true
Sometimes we need to have checkboxes in the GridView control and we want that as soon as the Checkbox is clicked/checked the postback happens and we get the value from the first row in the GridView control. This can be easily done by using the following code: <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnRowCommand="GridView1_Row... <Columns> <asp:BoundField DataField="CategoryID" HeaderText="CategoryID" /> <asp:BoundField DataField="CategoryName" ......

Posted On Tuesday, January 10, 2006 8:45 AM

Solving GridView Export Paging Problems
Few days ago there was a question asked on www.asp.net forums that how can I export the whole GridView to Excel if the paging is enabled. I prepared this small example which shows how to achieve the task. Please note that this example is implemented in Visual Studio.NET 2005 Professional. 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... ......

Posted On Monday, January 9, 2006 2:30 PM

Row_Deleting Event of the GridView Control
Most of you already know this but the GridView Row_Deleting in certain conditions. 1) If you have a LinkButton or a Button control inside the GridView and the CommandName property of the LinkButton or the Button control is set to "Delete". 2) The Row_Deleting event is also fired because of the the Delete column of the Command Field type. You can simply add a new Command Field Delete column using smart tag feature. 3) Row_Command is fired whenever any event occurs inside the GridView control. powered ......

Posted On Saturday, January 7, 2006 11:26 AM

Automatically adding Web.config file in your ASP.NET 2.0 Project
You can automatically add Web.config file in your ASP.NET 2.0 Website Project. Simply free F5 or start debugging and it will ask you to add the web.config and enable the compilation attribute to true. I still prefer to manually adding the web.config since when added automatically it does not add most of the tags and web.config file is pretty much empty. powered by IMHO 1.3 ......

Posted On Friday, January 6, 2006 11:09 AM

Visual Studio.NET 2005 helps while casting!
I was trying to run the following code: Hashtable hashTable = context.Values; For your information context.Values returns ICollection. Anyway, this gave me an error that there is problem problem converting ICollection to a Hashtable but the interesting thing in the error message was that it also said that the explicit conversion exists. I think thats pretty cool that Visual Studio.NET 2005 is helping you to actually cast the object to another type. Hashtable hashTable = (Hashtable) context.Values; ......

Posted On Friday, January 6, 2006 11:09 AM

Why don't I see multiple entries in the aspnet_Profile table for each user
One of the main reason can be that you are using Windows authentication and accessing the application with the same credentials. Each time you assign something to the profile object your data simply gets updated in the aspnet_Profile table. You can either add multiple users to the windows account or use Forms authentication. powered by IMHO 1.3 ......

Posted On Friday, January 6, 2006 9:28 AM

Profile Object making too many database trips
I am just playing arround with Profile Object in ASP.NET 2.0 and I just discovered an interesting thing. First of all here is my web.config file which shows that I am using SQL SERVER 2000 to save my profile object. <!-- CONNECTION STRING--> <connectionStrings> <add name="ConnectionString" connectionString="Server=lo... ;Database=MyDatabase;Truste... </connectionStrings> <system.web> <anonymousIdentification enabled="true"/> <profile defaultProvider="MyProfileP... ......

Posted On Thursday, January 5, 2006 10:36 PM

Stored Procedure to Generate Parameters in C#
Sometime ago I posted a Query which can generate the parameters for the C# code Generate Parameters using T-SQL. Now, I have converted that T-SQL to a simple Stored Procedure which you can use in your database. Here is the STORED PROCEDURE: /*Author: Mohammad Azam Email: azamsharp@gmail.com Description: This stored procedure is used to generate parameters for the C# code.DateCreated: 01-05-2006 DateModified: 01-05-2006 Usage: Create the stored procedure in the database you want to use and then use ......

Posted On Thursday, January 5, 2006 10:59 AM

Why does the ProfileCommon class depends on the <properties> tag in web.config
I was just trying to use the ProfileCommon class and I came accross this strange error. Here is my web.config file with the correct Profile object settings. <anonymousIdentification enabled="false" /> <profile enabled="true" defaultProvider ="ProfileSqlProvider"> <providers> <add name="ProfileSqlProvider" type="System.Web.Profile.Sq... System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d5... connectionStringName="Conne... /> ......

Posted On Thursday, January 5, 2006 12:16 AM

Keeping track of database table changes
You can keep track of the database table changes using the TRIGGERS. The below table keep track of the Customer table and whenever any INSERT, DELETE or UPDATE operation takes place it insert the tracking data into another table. Check out the TRIGGER code below. ALTER TRIGGER Customer_Activity ON Customer FOR INSERT,DELETE,UPDATE AS DECLARE @operationType varchar(100) DECLARE @customerID int DECLARE @count intDECLARE @countDeleted int DECLARE @table_name varchar(20) -- get the table name on which ......

Posted On Monday, January 2, 2006 10:24 PM

Reloading the Profile object to reflect the changes
I was having trouble using the profile object. In the Logged_In event of the Login control I assign the Profile properties some new values and redirect to the new page. But on the new page it was always reading the old values. Thanks to Fredrik I solved the problem by reloading the Profile object. Here are words of wisdom by Mr Fredrik " The problem is that the Profile still belongs to an anonymous user at the LoggedIn event of the Login control. The Profile feature uses an HttpModule, this module ......

Posted On Monday, January 2, 2006 10:30 AM

Copyright © Mohammad Azam | Powered by: GeeksWithBlogs.net