auto upload files by admin and download files
<div class="col-lg-4 about-img">
<!-- <a href="pdf/TentativePALeaflet.pdf"><img src="images/brouchere.JPG" alt="brouchere"></a>
<a href="pdf/TentativePALeaflet.pdf"><h4>Download Brouchere</h4></a><br>-->
<asp:Repeater ID="Repeater1" runat="server" >
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<% # Eval("title") %>'></asp:Label><br>
<a href="/download/<%#Eval("filename")%>" >Download</a><hr>
</ItemTemplate>
</asp:Repeater>
</div>
public partial class fordoctor : System.Web.UI.Page
{
SqlConnection cn;
SqlCommand cm;
SqlDataReader dr;
protected void Page_Load(object sender, EventArgs e)
{
bindRepeater();
}
protected void bindRepeater()
{
string cs = ConfigurationManager.AppSettings["doctor_DB"];
cn = new SqlConnection(cs);
cn.Open();
string k = "select * from downloaddata1";
cm = new SqlCommand(k, cn);
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(cm);
da.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
//cn.Close();
}
}
<!-- <a href="pdf/TentativePALeaflet.pdf"><img src="images/brouchere.JPG" alt="brouchere"></a>
<a href="pdf/TentativePALeaflet.pdf"><h4>Download Brouchere</h4></a><br>-->
<asp:Repeater ID="Repeater1" runat="server" >
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<% # Eval("title") %>'></asp:Label><br>
<a href="/download/<%#Eval("filename")%>" >Download</a><hr>
</ItemTemplate>
</asp:Repeater>
</div>
public partial class fordoctor : System.Web.UI.Page
{
SqlConnection cn;
SqlCommand cm;
SqlDataReader dr;
protected void Page_Load(object sender, EventArgs e)
{
bindRepeater();
}
protected void bindRepeater()
{
string cs = ConfigurationManager.AppSettings["doctor_DB"];
cn = new SqlConnection(cs);
cn.Open();
string k = "select * from downloaddata1";
cm = new SqlCommand(k, cn);
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(cm);
da.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
//cn.Close();
}
}