Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
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 July 17th, 2008, 04:34 AM
Authorized User
 
Join Date: Jul 2008
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

 
Old July 18th, 2008, 08:09 AM
Friend of Wrox
 
Join Date: Nov 2007
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
 
Old July 21st, 2008, 07:52 AM
Authorized User
 
Join Date: Jul 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gaurav gupta
Default

thanks






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





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