Infolink

 

Search This Blog

Showing posts with label n-tier application. Show all posts
Showing posts with label n-tier application. Show all posts

May 30, 2013

Create Folder Programatically with Database

TreeHierarchy.aspx

string appPath = Request.PhysicalApplicationPath.ToString();

            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>");
            }


Related Posts Plugin for WordPress, Blogger...