|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
I'm using a file called list.aspx to list the content of directories which works fine. What I need its when the files get listed in the IE I would like to have a two buttons next to the file name one to SAVE file and the one to DELETE the file. Thanks for your help. This is the code in the file. <html> <head> <meta name="GENERATOR" content="Microsoft FrontPage 6.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 1</title> </head> <body>Please read the disclaimer at the bottom of this e-mail <p><b><font face="Tahoma" color="#66CCFF" size="4">C drive Stuff</font></b></p> <%@ Import Namespace="System.IO" %> <script language="VB" runat="server"> Sub Page_Load(sender as Object, e as EventArgs) Dim dirInfo as New DirectoryInfo(Server.MapPath("")) articleList.DataSource = dirInfo.GetFiles("*.pdf") articleList.DataBind() End Sub </script> <asp:DataGrid runat="server" id="articleList" Font-Name="Tahoma" AutoGenerateColumns="False" AlternatingItemStyle-BackColor="#eeeeee" HeaderStyle-BackColor="#66ccff" HeaderStyle-ForeColor="White" HeaderStyle-Font-Size="10pt" HeaderStyle-Font-Bold="True"> <Columns> <asp:HyperLinkColumn DataNavigateUrlField="Name" DataTextField="Name" HeaderText="File Name" /> <asp:BoundColumn DataField="LastWriteTime" HeaderText= "Last Write Date" ItemStyle-HorizontalAlign="Center " DataFormatString="{0:d}" /> <asp:BoundColumn DataField="LastWriteTime" HeaderText= "Last Write Time" ItemStyle-HorizontalAlign="Center " DataFormatString="{0:t}" /> <asp:BoundColumn DataField="Length" HeaderText="File Size" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,### bytes}" /> </Columns> </asp:DataGrid> > I'm using a file called list.aspx to list the content of directories which Add a TemplateColumn to the list of Columns.> works fine. What I need its when the files get listed in the IE I would > like to have a two buttons next to the file name one to SAVE file and the > one to DELETE the file. -- Happy Hacking, Gaurav Vaish | http://www.mastergaurav.com http://www.edujinionline.com http://articles.edujinionline.com/webservices ------------------- Thanks for your answer Gaurav,
I really don't know what you mean could you explain please. Thanks. "Gaurav Vaish (www.EduJiniOnline.com)" <gaurav.vaish.nospam@nospam.gmail.com> wrote in message Show quoteHide quote news:%23BYcEN%233GHA.508@TK2MSFTNGP06.phx.gbl... >> I'm using a file called list.aspx to list the content of directories >> which works fine. What I need its when the files get listed in the IE I >> would like to have a two buttons next to the file name one to SAVE file >> and the one to DELETE the file. > > Add a TemplateColumn to the list of Columns. > > > -- > Happy Hacking, > Gaurav Vaish | http://www.mastergaurav.com > http://www.edujinionline.com > http://articles.edujinionline.com/webservices > ------------------- > > > I really don't know what you mean could you explain please. <Columns><TemplateColumn> <asp:Button id='saveButton' runat='server' onClick='saveButton_Click' Text='Save' /> <asp:Button id='deleteButton' runat='server' onClick='deleteButton_Click' Text='Delete' /> </TemplateColumn> </Columns> In the codebehind, add two methods -- saveButton_Click and deleteButton_Click. -- Happy Hacking, Gaurav Vaish | http://www.mastergaurav.com http://www.edujinionline.com http://articles.edujinionline.com/webservices -------------------
Control events - page life-cycle
ASP.NET 2.0 / GridView / ObjectDataSource / Update / Missing Columns The parameter is not correct from SqlDataAdapter control Controls calling other controls problem - ASP.NET 2.0 ASP.Net 2.0 DropDownList Selected Not Working... How to keep state of treeview control ASP.NET report viewer chart control dual axis support Gridview - disappearing data when column is hidden Custom Control inside <page>.aspx.cs Adding Regular Expression Validators to GridView |
|||||||||||||||||||||||