Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals 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 April 9th, 2010, 09:34 AM
Registered User
 
Join Date: Apr 2010
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Displaying an image

Hi,

I'm trying to display an image on run time.
I use a regular ASP image control and I do the following:

AppPhotoImage1.ImageUrl = recData.app_photo; //c:\tzdl\images\x.jpg
AppPhotoImage1.Visible = true;

this is VS 8, ASP.Net 3.5
and the image is not displayed on run time.
Your advice will be appreciated,
Thanks,
Ran
 
Old April 9th, 2010, 10:07 AM
Friend of Wrox
 
Join Date: Dec 2008
Location: , , .
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

Take a look at the page source using your browser. (If you want more help, please post that.)

On your web server, what's the URL of your image? and that's what you should use in ASP.net code as the image path. (For example it might be something like /mysite/images/beautifulday.jpg, not something like c:\beautifulday.jpg)

Last edited by PeterPeiGuo; April 9th, 2010 at 10:22 AM..
 
Old April 9th, 2010, 11:05 AM
Registered User
 
Join Date: Apr 2010
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default content page

Thanks Peter,

I have another issue.

I have a content page within a master page.
When I display the content page by Response.Redirect("content1.aspx");
The values in the text boxes of the master page disappeared.
What should I do ?

Thanks,
Ran
 
Old April 9th, 2010, 08:02 PM
Friend of Wrox
 
Join Date: Dec 2008
Location: , , .
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

When you redirect, you really moved away from the page (master + content).
 
Old April 10th, 2010, 03:17 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

The question about the master page is a cross-post, already discussed here: content page within a master page

Ran: can you please not cross post? This makes it more difficult to track threads. Additionally, you run the risk of spending time answering a question that has been answered elsewhere already.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!




Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying Image in a gridview cholletivinod ASP.NET 2.0 Basics 0 July 3rd, 2007 12:29 AM
Image not displaying shoakat ASP.NET 2.0 Professional 2 June 22nd, 2007 10:02 AM
array displaying as image vinodkokane Visual C++ 1 April 23rd, 2007 12:06 AM
Displaying a image in asp dhillon555 ASP.NET 1.0 and 1.1 Basics 0 February 18th, 2007 10:16 PM
displaying an image from file stream into an image sanjeet ADO.NET 0 September 23rd, 2005 10:28 AM





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