Thursday, February 15, 2007

Expanding the size of array

public static Array ExpandArray(Array arr, object newElement)
{
int length = 1;
System.Type type = newElement.GetType();
if (arr != null)
{
length += arr.Length;
type = arr.GetType().GetElementType();
}
Array result = Array.CreateInstance(type, length);
if (arr != null)
{
arr.CopyTo(result, 0);
}
result.SetValue(newElement, result.Length - 1);
return result;
}

JavaScript debugger

https://addons.mozilla.org/firefox/216


https://addons.mozilla.org/firefox/1843/


http://ajax.asp.net/docs/overview/ASPNETAJAXDebuggingAndTracingOverview.aspx

Sunday, February 11, 2007

Database diagram support objects cannot be installed because this database does not have a valid owner

The following command can solve the issue

EXEC sp_dbcmptlevel 'dbname', '90';

ALTER AUTHORIZATION ON DATABASE::dbname TO valid_login

Thursday, February 01, 2007

Post Back Event

function DoPostBack()
{
__doPostBack('Button2','My Argument');
}


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


http://aspalliance.com/895

SQL Server 2005 and XML

http://www.15seconds.com/issue/050803.htm