Solved

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

Posted on 2004-04-03
3
807 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

777 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