471,075 Members | 715 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,075 software developers and data experts.

asp:Image inside editable DetailsView

hi,

in a DetailsView i have a image display.

images i want to store in a seperate directory, but it a path is added to
Bind update and delete is not working.
just Bind makes my DetailsView updateable, but scripts and images would be
nice to be seperated.

<asp:TemplateField HeaderText="Bild">
<ItemTemplate>
<asp:Image ID="Bild" ImageUrl='<%# Bind("Bild") %>'
runat="server" />
</ItemTemplate>
<EditItemTemplate>
<asp:Image ID="Bild" ImageUrl='<%# Bind("Bild") %>'
runat="server" />
</EditItemTemplate>
</asp:TemplateField>

Bind with path parameters displays the image correctly, but makes my
DetailsView uneditable

<asp:TemplateField HeaderText="Bild">
<ItemTemplate>
<asp:Image ID="Bild" runat="server" ImageUrl='<%#
Bind("Bild", "../Upload/{0}") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:Image ID="Bild" runat="server" ImageUrl='<%#
Bind("Bild", "../Upload/{0}") %>' />
</EditItemTemplate>
</asp:TemplateField>

Container.DataItem displays the image correctly, but makes my DetailsView
also uneditable

<ItemTemplate>
<asp:Image ID="Bild" ImageUrl='<%# "../Upload/" &
Container.DataItem("Bild") %>' runat="server" />
</ItemTemplate>
<EditItemTemplate>
<asp:Image ID="Bild" ImageUrl='<%# "../Upload/" &
Container.DataItem("Bild") %>' runat="server" />
</EditItemTemplate>
would be apprechiated for a suggestion.

thanks a lot

Christian
Nov 14 '06 #1
0 2808

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Daisy | last post: by
6 posts views Thread by C K | last post: by
2 posts views Thread by Chris Dunaway | last post: by
reply views Thread by DavidS | last post: by
4 posts views Thread by Deere | last post: by
3 posts views Thread by Switch4Mac | last post: by
3 posts views Thread by Paul Cheetham | last post: by
1 post views Thread by =?Utf-8?B?R3JlZw==?= | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.