Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > save image in backfolder

Reply
Thread Tools

save image in backfolder

 
 
vinodkus@gmail.com
Guest
Posts: n/a
 
      12-03-2008
dear sir/madam

please tell me how to save image or any file in back folder in asp

i am doing like this but it is not working

path = Server.Mappath("../NewsImage")&"/"&Names
fields("imageLarge").value.SaveAS path
NewsImage folder is before controlpanel
and the page which contain this code is in controlpanel

but it is giving error in server.mappath .. is not allowed

Thanks in advance

 
Reply With Quote
 
 
 
 
Daniel Crichton
Guest
Posts: n/a
 
      12-03-2008
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote on Tue, 2 Dec 2008 22:41:14 -0800 (PST):

> dear sir/madam


> please tell me how to save image or any file in back folder in asp


> i am doing like this but it is not working


> path = Server.Mappath("../NewsImage")&"/"&Names
> fields("imageLarge").value.SaveAS path
> NewsImage folder is before controlpanel and the page which contain this
> code is in controlpanel


> but it is giving error in server.mappath .. is not allowed


> Thanks in advance


Either don't use .. in the path name, or change your IIS configuration to
allow .. in path names (parent paths).

If for instance NewsImage is straight off the root, use

Server.MapPath("/NewsImage") instead

otherwise use the appropriate relative path to the root of the site.

--
Dan


 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
save uploaded image thumbnail to sql db image field dodgeyb ASP .Net 1 12-14-2007 04:29 PM
How to save High Quality JPG image by setting Image module from PIL Daniel Mark Python 1 09-25-2006 05:59 PM
Save contents of iframe from parent's save button user ASP .Net 1 04-04-2005 07:44 PM
Save, Save As, Paste Phil Edwards Computer Support 1 06-27-2004 03:32 PM
How To Browse for an image file and save it to image server folder Mike John ASP .Net 0 07-28-2003 04:55 PM



Advertisments