Skip to main content

Posts

Showing posts from 2008

KGB Archiver - What a compression

Recently one of my friends introduced me a new archiving software that having an unbelievable compression ratio with its maximum mode, Plus unbelievable duration for compression, don’t worry anyway they have provided “turn off the machine after compression” facility ;) KGB Archiver - http://kgbarchiver.net/?page=home

How to find the control that caused the Page Submit in FormLoad event - ASP.NET

This function would be useful when someone needs to identify button clicks outside the respective button event Changing the selected object type, it's possible to find other controls as well. public static System.Web.UI.Control GetPostbackControlObject(System.Web.UI.Page pageReference) { System.Web.UI.Control returnObj = null; if (pageReference.IsPostBack) { //- Find postback control's Name in form __EVENTTARGET field... object eventTarget = pageReference.Request.Form["__EVENTTARGET"]; //- if __EVENTTARGET has a value (not null or an empty string), return the control with that name if ((eventTarget != null) && eventTarget.ToString().Trim().Count()>0) { return pageReference.FindControl(eventTarget.ToString().Trim()); } //- That is not working if the postback is trigered by a standard Buttons. // Get the control from the Page.Form collection. foreach (string keyName in pageReference.Request.Form) { Sys

Format HTML - Visual Studio 2005

it's very easy t format HTML or the mark up in a page using VS 2005 1. Select a part or the page which contains html 2. Select "Edit" menu and then select "Advanced" there are many useful options available note: it's always better to check things in your menus when you tired with your coding 3. Select format document or format selection accordingly, VS will do the formatting for you

Debug Stored Procedures (SPs) in Visual Studio .NET

Though I have heard of it I never wanted to try it till yesterday, the debugging a SP in Visual Studio .NET is a straight forward job as follows - Open your project - Add a New Connection to Visual Studio Select and open the respective SP and break point can be added then right click on the Stored Procedure in the Server Explorer, select Step into Stored Procedure "One more setting" – go to the project settings, Set Debuggers SQL Server true "Happy Debugging"