Asp.Net CheckBox List Validation From Javasscript

To check Chekbox Selected or not From CheckBoxList From Javascript Use the Following Code

var flag=0;
var result;
var chkList1=document.getElementById(“<%=chkName.ClientID%>”)
var arrayOfCheckBoxes= chkList1.getElementsByTagName(“input”);
for(counter = 0; counter<arrayOfCheckBoxes.length; counter++)
{
if (arrayOfCheckBoxes[counter].checked)
{
result = 1;
return true;
}
else
{
result = 0
}
}

if(result == 0)
{
alert(‘Please Select At Least One CheckBox’);
return false;
}

Asp.Net How to write Css File or File Write in Asp.Net

StreamWriter sw = File.CreateText(Server.MapPath(@”css\admin.css”));
sw.Write(txtCSS.Text);
File.WriteAllText(Server.MapPath(@”css\temp.css”), txtCSS.Text);
sw.Close();

string sSource = Server.MapPath(@”css\temp.css”);
string sExepath = Server.MapPath(@”css\admin.css”);

// Copy the file.
File.Copy(sSource, sExepath, true);