file upload,show,delete using file uploader in c# asp net

preview_player
Показать описание
C#, PHP,MSSQL Server,ASP.NET, Crystal Report,Jquery video tutorials for beginners

Рекомендации по теме
Комментарии
Автор

Plz subscribe my channel and like or share

Pardeepdeveloper
Автор

thank you so much bro
it's very usefull for me

sirajsumra
Автор

Hi for the delete button before i type in the command for the event handler i could not even get it to work at all. Error message: Compiler Error Message: CS1061: 'student_updateprofile_aspx' does not contain a definition for 'LinkButton_Command' and no extension method 'LinkButton_Command' accepting a first argument of type 'student_updateprofile_aspx' could be found (are you missing a using directive or an assembly reference?) my line: <asp:LinkButton ID="LinkButton" runat="server" CommandArgument='<%# Eval("path") %>' if can do reply asap thanks;)

teckyew
Автор

Hello, the images will not delete. here is the ..cs code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.IO;

public partial class UsersGallery : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
show_data();
}

private void show_data()
{
DirectoryInfo d = new
FileInfo[] r = d.GetFiles();
DataTable dt = new DataTable();
dt.Columns.Add("path");
for (int i = 0; i < r.Length; i++)
{
DataRow row = dt.NewRow();
row["path"] = "~/Data/"+ r[i].Name;
dt.Rows.Add(row);
}
DataList1.DataSource = dt;
DataList1.DataBind();
}
protected void Button2_Click(object sender, EventArgs e)
{


if (FileUpload1.HasFile)
{
string path = "~/data/" + Guid.NewGuid().ToString() + "" +

Response.Write("Upload Successfull");
show_data();
}
}

protected void LinkButton1_Command(object sender, CommandEventArgs e)
{

Response.Write("File Deleted");
show_data();
}
}

tolmzy
Автор

is this can be use to upload file such as words, excel etc? or just for images?

reihotd
Автор


in this sentence "CommandArgument" not display please help
and i have visual studion 2008

sirajsumra
Автор

Hello.im having this error. Please help.

Server Error in '/' Application.Configuration ErrorDescription: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: 'System.Web.Mvc.WebViewPage' is not allowed here because it does not extend class 'System.Web.UI.Page'.Source Error: Line 30: <add type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />Line 31: </httpModules>Line 32: <pages 33: <namespaces>Line 34: <add namespace="GridMvc" />

sallypepin
Автор

asp.net code for display image in image controller

kavya_
Автор

I have it to work now. Thanks a lot. Do you have a video to allow only authorized users to delete?

tolmzy