hello,
I want to know how to know the FileName AjaxFileUpload in the event Click of a Button without going through earnest for this is what I found
that is to say that the FileName is only in the event Designed AjaxFileUpload1_UploadComplete.
and thank you in advance.
protected void InsertButton_Click(object sender, EventArgs e)
{
lblMSG.Text = ViewState["filename"].ToString();
}
protected void AjaxFileUpload1_UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
{
ViewState["filename"] = e.FileName;
}
protected void AjaxFileUpload1_UploadComplete (object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
{
string filePath = "~ / upload /" + e.FileName;
AjaxFileUpload1.SaveAs (filePath);
}