File Upload Control - Defaulting a Value

Posted on 2006-05-16
Last Modified: 2012-08-13
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...
Question by:goodmanro
    1 Comment
    LVL 27

    Accepted Solution

    Unfortunately you can not set a preset value to the fileupload control.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
    In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now