Solved

How to Add String/Text with '<%# DataBinder.Eval(Container.DataItem, "PictureURL") %>'

Posted on 2004-04-03
3
809 Views
Last Modified: 2012-06-27
I want to add jpg at the end of DataBinder.Eval.

Say i populate a grid with some fields and 1 of that field is "PictureURL"

"PictureURL" has this value "Picture1"

My Image tag is like this....

<asp:Image ImageUrl='<%# DataBinder.Eval(Container.DataItem, "PictureURL") %>' runat="server" ID="imgLeftFrame" Width="148px" Height="78px" />

but i need to add ".jpg" at the end and "picture\" at the beginning.

how ???
0
Comment
Question by:shurid
3 Comments
 
LVL 7

Accepted Solution

by:
ramesh12 earned 75 total points
ID: 10749245
<asp:Image ImageUrl='<%# formaturl(DataBinder.Eval(Container.DataItem, "PictureURL")) %>' runat="server" ID="imgLeftFrame" Width="148px" Height="78px" />



function formaturl(picUrl as string) as string   -----              

return "picture\" & picurl & ".jpg"
end function
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

791 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