Infolink

 

Search This Blog

Showing posts with label examples of asp.net program. Show all posts
Showing posts with label examples of asp.net program. 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>");
            }


Nov 14, 2012

Adding Code to the Event Handler (PART-14)

Adding code to the event handler is, well, exactly as you would expect it to be. Place the cursor in the space between Protected Sub Button1_Click(…) and End Sub and type the appropriate code in. For

now, all the code will do is change the text of the label (Label1) to, you guessed it, "Hello world!". Type in the following code, and pause after you type the period:
Related Posts Plugin for WordPress, Blogger...