Wrox Programmer Forums
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 21st, 2008, 05:22 AM
Authorized User
 
Join Date: Apr 2007
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default ResolveUrl in ASP.NET

Hello Everyone,

I'm fetching images stored in the folder and images(s) path is stored in my database but because of ~/ it's not bringing the images in my DataList that's why i'm trying to use ResolveUrl to solve my problem.......

I'm giving my code please let me know where to use ResolveUrl in my code or any other alternative in my code


<img src="<%# DataBinder.Eval(Container.DataItem,"Image") %>" />

 
Old March 21st, 2008, 08:53 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You should be able to do this:

<img src="<%# ResolveUrl(DataBinder.Eval(Container.DataItem,"Ima ge")) %>" />

-Peter
peterlanoie.blog
 
Old March 10th, 2009, 12:59 AM
Registered User
 
Join Date: Mar 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default hi

Hi,

I am doing urlrewriting and used the ResolveUrl() for images on aspx...but for every image it is wrong to use that ResolveUrl() bcoz it goes to server for processing for every image display...

So is there is alternative for ResolveUrl(). to map paths.

Thanks

Quote:
Originally Posted by planoie View Post
You should be able to do this:

<img src="<%# ResolveUrl(DataBinder.Eval(Container.DataItem,"Ima ge")) %>" />

-Peter
peterlanoie.blog





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET 3.5 answers in Professional ASP.NET 3.5 jminatel ASP.NET 3.5 Professionals 1 August 22nd, 2011 07:34 AM
Turning a regular ASP.NET App into an AJAX ASP.Net donrafeal7 Ajax 2 August 31st, 2007 12:33 AM
Database diagram in .net using asp.net,c#.net scotttiger ADO.NET 2 February 16th, 2005 01:35 AM
ResolveURL("~/...") -> ??? planoie ASP.NET 1.0 and 1.1 Professional 0 October 29th, 2003 04:38 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.