• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 235
  • Last Modified:

File Upload Control - Defaulting a Value

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...
1 Solution
Sammy AgeilCommented:
Unfortunately you can not set a preset value to the fileupload control.

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now