faizan ahmad

Usually the things which were not a straight Google

  Home  |   Contact  |   Syndication    |   Login
  17 Posts | 0 Stories | 68 Comments | 0 Trackbacks

News

Archives

Post Categories

.NET

ASP.NET

January 2009 Entries

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 ......

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 ......

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 asp.net Panel tag and set DefaultButton property. <asp:Panel ID="pnlSearch2" runat="server" DefaultButton="btnSearch2"> TextBox2 btnSearch2 </asp:Panel> ......

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: http://www.codeproject.com/... In my case though I had a 'tr' element within 'HeaderTemplate' element ,so I applied it to like: <tr class="ms-formlabel DataGridFixedHeader ......

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' ......

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 ......