Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Server.MapPath in Class ?

Status
Not open for further replies.
Ideally, you won't import anything. Instead, create a Public Property in your class and set the value (using Server.MapPath) from your actual web page. If you want to go against the OO approach I described, use Httpcontext.Current.Server.MapPath but I wouldn't recommend it.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Well I wouldn't want to go against standard OO convention. Which is what I was wondering to begin with, but I am using a dataset, and need to get the file/server path to save it as an xml. So I'm just reading an XSD file to get the dataset structure then resaving the resulting xml. Or would passing in the path be a better option?

-
 
I'd pass in the path to where it should be saved.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
shams123 - Did you read my first post?


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top