save image in backfolder

V

vinodkus

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
 
D

Daniel Crichton

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,262
Messages
2,571,056
Members
48,769
Latest member
Clifft

Latest Threads

Top