Thursday, May 29, 2008

Dataset validation

if(ds != null && ds.Tables[0].Rows.Count > 0)
{
...
}

Tuesday, May 20, 2008

Get specific field count on a table

SELECT FieldName, COUNT(FieldName)
FROM Table
GROUP BY FieldName
order by COUNT(FieldName) desc

Monday, May 19, 2008

Change GridView backgrod color

aspx

< id="grdLicensedClients" runat="server" onrowdatabound="grdLicensedClients_RowDataBound">

c#

protected void grdLicensedClients_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
DataRowView drv = (DataRowView)e.Row.DataItem;

string areaCode = drv["Area"].ToString();

if (_duplicateAreaCodes.Contains(areaCode))
{
e.Row.BackColor = System.Drawing.Color.Yellow;
}
}
}

Monday, February 25, 2008

Reset IIS and Async service, batch file

iis and async service restarted



.

Saturday, February 23, 2008

Friday, January 4, 2008

Wednesday, January 2, 2008

VPC August 2007 Networking Settings

screenshot



External access from a virual enviroment.