Geeks With Blogs
faizan ahmad Usually the things which were not a straight Google January 2009 Entries
Install Visual Studio 2003 when Visual 2005 is intalled already
other day I had to install Visual studio.NET 2003 on my system, the problem was I had Visual Studio 2005 and 2008 with framework 2.0 and 3.5 and I did not have .NET 1.1 on it. There were two suggetions from ppl at work: Install .NET framework 1.1 and load project in VS 2005 You will need to Un install VS 2005 and 2008 and then install VS.NET 2003 After googling a little first idea did not seem workable and I was not ready to follow the second option of starting all over. Half hour down I found a ......

Posted On Monday, January 26, 2009 3:38 PM

Scroll Div on page load
If you have a gridview/repeater control or other tabular data within a div, scroll bar appears when height of data gets bigger than that of DIV. If you want to scroll down to a certain position, you can use 'Element.scrollTop' property in Javascript: document.getElementById(div... = PixelsToScroll; Calculating the PixelsToScroll may vary depending on scenerio, In my case, I wanted to scroll down to a selected row within Repeater control. Row was selected using RadioButton and page ......

Posted On Thursday, January 8, 2009 4:36 PM

Call OnClick Event of Button when Enter key pressed in TextBox
Problem: Say you have two Grid View controls on one page, each grid view has a TexBox and a 'search' button above it TextBox1 btnSearch1 TextBox2 btnSearch2 Now if you press 'Enter' key in TextBox1, it will trigger btnSearch1_click event and when you press 'Enter' key in TextBox2, it still triggers btnSearch1_click Solution: Add Panel tag and set DefaultButton property. <asp:Panel ID="pnlSearch2" runat="server" DefaultButton="btnSearch2"> TextBox2 btnSearch2 </asp:Panel> ......

Posted On Thursday, January 8, 2009 4:15 PM

Fixed Header for Data Repeater Control
I had a Repeater control within a div. Now when there were more records than visible within height of DIV a scroll bar appear. But, when user scrolls down, the headings ( within HeaderTemplate) would go up and not be visible. After googling a little, I was able to find the solution on code project: In my case though I had a 'tr' element within 'HeaderTemplate' element ,so I applied it to like: <tr class="ms-formlabel DataGridFixedHeader ......

Posted On Thursday, January 8, 2009 3:48 PM

Debug stored procedure
It s really easy to debug a SQL sever stored procedure in Visual Studio, here are the steps: Open Server Explorer Connect to the Database which have the stored procedure that you want to debug Once you are connected to a DB, it will display DB objects in Server Explorer, Click to expand Stored Procedures Right Click on the Stored Procedure ( that you want to debug ) Click on 'Step Into Stored Procedure' ......

Posted On Monday, January 5, 2009 11:46 AM

join in SQL update statement
I had to update value from a staging table( this might be a temp table ) into another database table. Here is how I did it using a inner join in the Update statement. UPDATE Table1 SET Table1 . Field1 = StagingTable . Field1 FROM Table1 INNER JOIN StagingTable ON Table1 . Field2 = StagingTable . Field2 WHERE StagingTable . Field3 IS NOT NULL ---------------------------... way we can use JOINs in delete statementsSyntax for join in Delete is a bit different ......

Posted On Monday, January 5, 2009 11:33 AM

Copyright © faizanahmad | Powered by: