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

--