Error while retreiving the path from database to fileupload control

Posted by Saritha.rajeshkumar under C# on 6/8/2011 | Points: 10 | Views : 2397 | Status : [Member] | Replies : 1
hi,
this is saritha

I have uploaded the image in database, now i want to retreive the path from database to fileupload control,

i have used the codes

FileUpload1.FileName = dr[1].ToString();

iam getting the error
CS0200: Property or indexer 'System.Web.UI.WebControls.FileUpload.FileName' cannot be assigned to -- it is read only




Responses

Posted by: Ndebata on: 6/8/2011 [Member] Starter | Points: 25

Up
0
Down
Hi
Its not allowed for security resaons.
you can not set the FileName properties of the ASP.Net FileUpload control. as it is a readonly property.

Thanks,
Debata

Saritha.rajeshkumar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response