Monday, June 16, 2008

Accessing __doPostBack parameter from code behind

Whenever a ASPX page is post back __doPostBack (if its enabled)function is called back. The __doPostBack function contains two arguments, eventTarget and eventArgument. The eventTarget is the control which has invoked the call and the eventArgument is values passed along. Sometimes this "eventArgument" is required and it can be accessed as follows from the C# code behind file.

string passedArgument = Request.Params.Get("__EVENTARGUMENT");

Thanks.



--

Wednesday, June 11, 2008

VS 2008 & debugging issue

Whenever in VS Studio 2008, break point (while debugging the source code) is not getting hit then do the try to clean the solution first and rebuilt the solution.

It happened to me when I was working on one of the C# code and while debugging the code the break point was not getting hooked up. After sometime just by chance when I cleaned the VS solution I could make it.

Solution can be cleaned by - Solution Explorer -> Right click on the solution -> Clean Solution

--

Thursday, May 29, 2008

There is a good artical on adding Images / Icon to newly create tool bar in MS Office 2003/2007 applications.
How to: Add Custom Icons to Toolbar and Menu Items
Keywords : Creating a Toolbar, stdole IPictureDisp , msoButtonIcon

Simant

Thursday, April 24, 2008

Change default namespace of .NET application

Change default namespace of .NET application (VS 2008)

This is one of the thing for which I did browsing, searching, asking for help from friends but no scuccess until I had a look into ".csproj" file. So one can "change the default namespace for a .NET application" by just changing the value of "" element of "" root to the desired value.

If you are looking into the Properties of .NET application (specially VSTO) then you will always find the option disabled for default namespace.

Simant.

Wednesday, April 23, 2008

com.microsoft.sqlserver.jdbc.SQLServerException

Error while connecting to MS SQL Server 2005 database from a Java client
"com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect"
Solution : This happends besause TCP/IP is not enable. You need to enable the protocol and RESTART the "SQLServer" services.