473,372 Members | 860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 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 2870

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John Scott | last post by:
I am storing an image in an SQL database and have one field as an image datatype. I am also using a webservice to transport data. I want to be able to resize the image and pass back a thumbnail...
0
by: Daisy | last post by:
Is there any way in an ascx (without resorting to a codebehind file) to have a client-side onload event on an asp:image tag? I've just changed from a normal image, to an asp:image tag, but now it...
6
by: C K | last post by:
What is less expensive/intensive on the server -dynamically writing out my rollovers to an asp:literal, or to use asp:image tags for the images. My image names will be dynamic as I am building a...
2
by: Chris Dunaway | last post by:
I was looking over some asp.net code and saw this asp:Image control: <asp:Image ImageUrl="~/images/logo.gif" runat="server" ID="Image1"/> What does the tilde (~) mean in the ImageUrl...
0
by: DavidS | last post by:
I have HTML web page with <asp:Image id=img_L runat=server ImageAlign=Top Visible=True Width=y Height=x></asp:Image>. For some images, less than 128K I can view image. Other image files > 128K,...
4
by: Deere | last post by:
When I try to take a database field and change it with a function and return it...it will not display the image. The "Imageurl" does not convert to "src=" but stays as ImageUrl. id=Image2 will...
3
by: Switch4Mac | last post by:
Hi, I want to insert an ad in my MasterPage. So in the MasterPage, I have this piece of code: <asp:Image ID="GatesAd" runat="server"...
3
by: Paul Cheetham | last post by:
Hi, I have an application that will display user-defined images in some asp:image controls. (sets the ImageURL, and is always built from the site root) The problem comes when the images...
1
by: =?Utf-8?B?R3JlZw==?= | last post by:
Is it possible to arrange the fields in my asp.DetailsView control in two or more columns? Or, am I limited to just one column?
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.