Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 17th, 2008, 04:34 AM
Authorized User
 
Join Date: Jul 2008
Location: new delhi, delhi, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gaurav gupta
Default two pictures upload at page 1 and see at page 3

actually i am trying to post two images at page 1 in a folder and want to show the image at page 3.so i am using the code:
string filepath = "C:\\Uploads";
        Session["path"] = filepath;
        HttpFileCollection uploadedFiles = Request.Files;
        //List<string> myFiles = new List<string>();
        for (int i = 0; i < uploadedFiles.Count; i++)
        {
            HttpPostedFile userPostedFile = uploadedFiles[i];
            userPostedFile.SaveAs(filepath + "\\" +
                       System.IO.Path.GetFileName(userPostedFile.FileName ));


to post the image at one click .and want to show at page 3 .how it is possible plz tell me.



thanks....gaurav

  #2 (permalink)  
Old July 18th, 2008, 08:09 AM
Friend of Wrox
 
Join Date: Nov 2007
Location: Central Florida, USA.
Posts: 207
Thanks: 2
Thanked 15 Times in 15 Posts
Default

First you need to store the file paths some where. I think a Session variable would be fine for this. Then i would store counter in session variables ("Path1" and "Path2") so you know how many pictures to display. Then on the page you want to show the pictures. Check the counter so you know how many images to create then check the Path session variables so that you can display the images.

Are there only going to be a maximum of two images at a time?

So your Session["Counter"] will tell you how many images to display. and your Session["Path1"] and Session["Path2"] will tell you where to set the source of your images....

Jason Hall
  #3 (permalink)  
Old July 21st, 2008, 07:52 AM
Authorized User
 
Join Date: Jul 2008
Location: new delhi, delhi, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gaurav gupta
Default

thanks

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to display pictures on JSP page? coitri JSP Basics 19 November 24th, 2008 06:22 AM
How to display pictures on JSP page? Kisat JSP Basics 1 November 3rd, 2008 09:02 PM
How to upload image without refreshing page in IE malay mehta Beginning PHP 3 March 6th, 2007 10:25 AM
Page not found upon image upload phpPro2000 Pro PHP 1 April 20th, 2006 02:37 PM
Upload Pictures/Videos Mantis Pro PHP 0 December 13th, 2004 03:20 PM



All times are GMT -4. The time now is 01:48 AM.


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