Wednesday, July 22, 2009

DB Copy of table

SELECT *
INTO copy_of_testlist
FROM testlist

Wednesday, July 15, 2009

PageMethods

PageMethods.Echo('Hello World!', onComplete, onTimeout, onError, onAbort, context, timeout, priority);

First of all, we must pass all the arguments that the page method is accepting, separated by a comma; in this case, the Echo method accepts one argument, the string to echo. After the list of the server method's arguments, we can pass the references to three methods to call when the page method returns:

•onComplete, is a function that will be called if the page method returns with no errors.
•onTimeout, will be called if the page method doesn't return a value within the specified timeout interval.
•onError, will be invoked if an error occurs during the process of the asynchronous request (for example, an Exception being raised on server-side).
•onAbort, is invoked when the asynchronous request is aborted. This can be done by calling the abort() method on the WebRequest object returned with the call to PageMethods.Echo().
•context, is the state object that will be passed to the callbacks when processing results.
•timeout, specifies the timeout before an asynchronous request is dropped. A response must arrive before the timeout occurs.
•priority, is a number that specifies the priority of the asynchronous request.

DataKeys of gridview

Convert.ToInt32(this.gridview1.DataKeys[row.RowIndex].Values[0])