DetailsView and FileUpload

A

Andre

Hi,

In my detailsview, when editing, i try to use a Filepload field to
change the file name in my DB and upload it to the server.
But when i click the Update button i receive this error : Must declare
@image1

Every other field in my detailsview (textbox, checkbox, calendar) are
working #1, but not this one...

Here's a copy of my code :

<asp:TemplateField HeaderText="Image 1">
<EditItemTemplate>
<asp:FileUpload ID="FileUpload1" runat="server" />
</EditItemTemplate>
<ItemTemplate>
<asp:Image ID="image1" runat="server" ImageUrl='<%# "images/" &
Eval("image1") %>' Width="150" />
</ItemTemplate>
</asp:TemplateField>


Any ideas ?
Thanks
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top