File Upload Control - Defaulting a Value
Posted on 2006-05-16
I have the following in a GridView:
<asp:FileUpload id="ImageURLTB" BindingContainer="ImageURL" AlternateText="You cannot upload files" runat="server" />
I have the AutoGenerateEditButton="True" on the Gridview. When I click the Edit button to edit a row, the file upload control is blank. How can I default the current db value for that control? For instance, I am storing the value something like this in the code behind:
DataConnection.UpdateParameters("ImageURL").DefaultValue = "images/Employees/" + ImageURLTB.FileName
So, when I edit an existing row, I want the file upload control to have the value images/Employees/joe.jpg already defined. Does that make sense?
Thanks for any help that you may be able to offer...