Posts

Showing posts from October, 2012

Copy All files from one folder to other folder in Asp.net

Hi , Here am creating th edirectory at runtime and am coping the All files from one folder to other folder  at a time. <div>     <asp:textbox ID="Textbox1" runat="server"></asp:textbox><br />         <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />         <br />          <asp:Label ID="lblMessage" runat="server"/>     </div> C# code  protected void Button1_Click(object sender, EventArgs e)     {         string directoryPath = Server.MapPath("~/") + Textbox1.Text;         //string[] f = Directory.GetFiles(Server.MapPath("/Account"));       if (!Directory.Exists(directoryPath))       {           Directory.CreateDirectory(directoryPath);           lblMessage.Text = "Directory created";           DirectoryInfo dir1 = new DirectoryInfo(Server.MapPath("~/Account"));           DirectoryI

Bind data to Dropdownlist inside gridview

 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" ShowFooter="true"         DataKeyNames="Slno" OnRowDataBound="GridView1_RowDataBound" Height="202px" Width="347px">         <Columns>             <asp:TemplateField HeaderText="Item Name">                 <ItemTemplate>                     <table width="100%">                         <tr>                             <td width="20%">                                 <asp:Label ID="lblname" runat="server" Text='<%#Eval("Slno") %>' />                             </td>                             <td width="20%">                                 <asp:Label ID="lblprice" runat="server" Text='<%#Eval("Price") %>' />