0

I use

FileUpload.Filename = lbl1.text.ToString();
FileUpload.SaveAs(Server.MapPath("~/Photo/AllPhotoes/" + FileUpload.FileName));

and i got Error: Property or indexer 'System.Web.UI.WebControls.FileUpload.FileName' cannot be assigned. it is read only.


I want to save image with label name which is hidden. and it get new value each time.
how can i change image name with label name.

help me....

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by kesaven
0

So the code should be,

FileUpload.SaveAs(Server.MapPath("~/Photo/AllPhotoes/" + lbl1.text));
0

Try the AsyncFileUpload from the AjaxControlToolkit

Edited by __avd: Snipped URL.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.