How to set the background color of a web page using code behind?

Yes In the body tag, add runat=’server’ and give the tag an id (e.g. id=’bodyID’). In the class definition in the code-behind, add VB.NET Protected bodyID As System.Web.UI.HtmlControls.HtmlGenericControl C# protected System.Web.UI.HtmlControls.HtmlGenericControl bodyID ; In code, use the attributes collection to set the bgcolor attribute: VB.NET bodyID.Attributes.Add(‘bgcolor’, ‘green’) C# bodyID.Attributes.Add(‘bgcolor’, ‘green’);

How to loop through a Dataset to display all records

VB.NET ’Fill Dataset Dim dc As DataColumn Dim dr As DataRow For Each dr In ds.Tables(0).Rows For Each dc In ds.Tables(0).Columns Response.Write(dr(dc.ColumnName).ToString()) Next Next C# //Fill the DataSet foreach (DataRow dr in ds.Tables[0].Rows) { foreach( DataColumn dc in ds.Tables[0].Columns) { Response.Write(dr[dc.ColumnName].ToString()); } }