Selecting a file on an Editpage

N

Nenefta

Hi all,

How would I go about creating an editpage where the user can select a
file (e.g. using the UploadFile Control)? The selected filename will be
stored in a DB. However, I need the page to show this filename in that
same control when the user comes around this page a second time to edit
the data again... The big problem is that I don't know any control that
will allow me to initialise with a filename and is able to throw the
FileSelect Dialogbox. Is there anything like that out there??

Greets,
Marcel
 
N

Nenefta

For the record:

I found a simple workaround for my problem. I created a div that is
shown on top of my <input file> control. Javascript will fill in the
selected documentname. I can now initialise the textbox with the
filename previously selected:

<div style="position:relative">
<div id="ImageFileSelect"
style="position:absolute;background-color:white;left:0;top:0;">
<asp:TextBox ID="tbImage" runat="server" Height="14px"
Width="272px"></asp:TextBox>
</div>
<input id="File1" style="width: 376px" type="file"
onchange="this.form.ctl00$cphContent$BerichtEdit1tbImage.value=this.value;return
true;"/>
</div>

Tricky part is to get the controlname for the textbox right.... ;-)

Grts,
Marcel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top