TreeHierarchy.aspx
DirectoryInfo newDirectory = new DirectoryInfo(appPath + txtName.Text);
BAL obj1 = new BAL();
DataTable dt = new DataTable();
SqlParameter []p =new SqlParameter[1];
p[0]=new SqlParameter("@FName",txtName.Text);
string chk= obj1.ExecuteScaler("SP_CreateFolder", p);
if (!newDirectory.Exists)
{
newDirectory.Create();
}
else if (chk == "1")
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "", "<script>alert('Already Exists');</script>");
}