473,738 Members | 7,110 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

file upload at diff locations

hi all,

I have website build using c# where I have 3 images in my homepage. I have a
table called images where I store the physical path of all 3 images.
eg: Image1 --> C:\StoreImages\ User1\Image1.jp j
Image2 --> C:\StoreImages\ User1\Image2.jp j
Image3 --> C:\StoreImages\ User1\Image3.jp j

When my website loads, I read this table to populate images.

Now my requirement is such that users who have account with my website, can
actually upload their own images and have it display on homepage after they
have logged in. So home page images will be different for all users.
I have Admin.aspx page where user can upload their own image.

My problem starts here.

I store all images on C:\StoreImages\ ...
If a new user gets registered, then I want to create a new folder called
User1 at C:\StoreImages\ User1\ and store all images here.
If a registered user logs in, then I would like to search C:\StoreImages
folder for RegisteredUser and then replace images for that user.

I don't know how i can create new folder for new user and search folder for
exiting user.

Could anyone please help ?

thanks
puja
Jun 21 '06 #1
2 1589
Raj
To resolve, create a directory for each user account with it's id
name(unique) in C# you have System.IO.Direc tory class which will help you,
you can always search if the direcytory exisits else create and display the
picture.

Raj

"puja" wrote:
hi all,

I have website build using c# where I have 3 images in my homepage. I have a
table called images where I store the physical path of all 3 images.
eg: Image1 --> C:\StoreImages\ User1\Image1.jp j
Image2 --> C:\StoreImages\ User1\Image2.jp j
Image3 --> C:\StoreImages\ User1\Image3.jp j

When my website loads, I read this table to populate images.

Now my requirement is such that users who have account with my website, can
actually upload their own images and have it display on homepage after they
have logged in. So home page images will be different for all users.
I have Admin.aspx page where user can upload their own image.

My problem starts here.

I store all images on C:\StoreImages\ ...
If a new user gets registered, then I want to create a new folder called
User1 at C:\StoreImages\ User1\ and store all images here.
If a registered user logs in, then I would like to search C:\StoreImages
folder for RegisteredUser and then replace images for that user.

I don't know how i can create new folder for new user and search folder for
exiting user.

Could anyone please help ?

thanks
puja

Jun 21 '06 #2
could you please help me with the code for below solution ?

"Raj" <Ra*@discussion s.microsoft.com > wrote in message
news:8A******** *************** ***********@mic rosoft.com...
To resolve, create a directory for each user account with it's id
name(unique) in C# you have System.IO.Direc tory class which will help you,
you can always search if the direcytory exisits else create and display
the
picture.

Raj

"puja" wrote:
hi all,

I have website build using c# where I have 3 images in my homepage. I
have a
table called images where I store the physical path of all 3 images.
eg: Image1 --> C:\StoreImages\ User1\Image1.jp j
Image2 --> C:\StoreImages\ User1\Image2.jp j
Image3 --> C:\StoreImages\ User1\Image3.jp j

When my website loads, I read this table to populate images.

Now my requirement is such that users who have account with my website,
can
actually upload their own images and have it display on homepage after
they
have logged in. So home page images will be different for all users.
I have Admin.aspx page where user can upload their own image.

My problem starts here.

I store all images on C:\StoreImages\ ...
If a new user gets registered, then I want to create a new folder called
User1 at C:\StoreImages\ User1\ and store all images here.
If a registered user logs in, then I would like to search C:\StoreImages
folder for RegisteredUser and then replace images for that user.

I don't know how i can create new folder for new user and search folder
for
exiting user.

Could anyone please help ?

thanks
puja

Jun 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2516
by: Charley | last post by:
I've got a diff file that I think is a patch for a bunch of file in a directory. How do I apply this file? I thought it was #patch myfile.diff But that does nothing. I must be missing something. The diff file contains diff's for a nuch of files, not just a single file. Do I need a
6
2686
by: Ben | last post by:
Hi everybody! I have a multi-file upload form... Please looks at my code below. It's in an initial stage. I'm trying to display the values of each text box when I press "upload" but it doesn't seem to work... i don't know what's the problem.. I'm using PHP5. <html> <head> </head> <body>
2
2874
by: Brian Madsen | last post by:
Hey guys, I am currently working on a remote file upload utility from an external server to a local server. Problems I face is: 1)the request server cannot be mapped - ie. i can't secure it by using the IP or somesuch. 2)the process is automatic, no user interaction involved.
2
1917
by: Andy Johns | last post by:
I've seen plenty of examples of file uploads in ASP.NET when the only form element is the file input type, but I've not seen a practical example of a file upload routine running alongside other form elements, e.g. a text box for a description for example. If the form is being posted in multipart format then the text coming through will need to be converted first, won't it? The other issue is that if the form is posted, and the...
18
2336
by: walterbyrd | last post by:
I am trying to develop an app where: the same file, in the same place, will be uploaded, and then processed. Everything I can find about uploading a file, uses a form that requires the user to either manually enter the path and file name, or to browse for the file. I do not want that. Ideally, I want the user to click on a link, and the server side php app does the rest. Again, the file always has the same name, and is in the same place....
4
1798
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. I'm building a program which allows users to upload files (located both on their computer and on our network) onto a file server. However, it appears that the Internet Guest Account on the webserver must have access to every possible file location from-which the users are selecting files. If this access is missing, an exception of type System.UnauthorizedAccessException occurs. Obviously its impractical for me to grant the...
9
4214
by: loudking | last post by:
Dear all, I am writing a client-server application and the client should upload a file to the server, then the server should display the content of the file in stdout. Because I have to deal with binary files, I cannot use character strings, so I chose integer array instead. But the problem is that how can I display them in stdout? I tried "%c"
3
1081
by: Asprisa | last post by:
Hi guys, I have managed to code a file that uploads a file, resizes it to 100 x 100 px, and then generates a random number and renames the image (so i do not get images over writing each other), what i am stuck on is trying to block uploads that are over 200kb, and if there is no file to upload (as there will be no need sometimes to upload a file) to skip the code all together in order to process some more code i got going on after this...
6
4961
by: Laphan | last post by:
Hi All I can't get round this because it's a local government thing, but I've done a CMS for a school (in ASP classic) that allows them to upload gifs, jpgs, pdfs and docs to their site for the usual CMS stuff. Works fine on my host as I use ASPupload and I have one FTP location for my data, but I've now found out that I've got to put the site on the local government's servers and they only provide the following setup:
0
8788
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9476
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9208
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6751
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4825
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2745
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.