Hi friends.,

I need one help from you all. Actually i am working asp.Net 4.0, i need to specify path in different folder in my project.so, i think if i place server.mappath in web.config is very useful for me how can i place it.

tell me any sample or code
Thank you

Recommended Answers

All 2 Replies

Member Avatar for stbuchok

You can't put code in the web.config file, it is just an XML file. However, I believe you can have your path as follows (and please, someone correct me if I'm wrong):

<node attribute="~/folder/file.ext" />

The tilde I believe works the same way as having server.mappath, but again, I'm not 100% positive on this, but at least it's something you can look into.

You can't put code in the web.config file, it is just an XML file. However, I believe you can have your path as follows (and please, someone correct me if I'm wrong):

<node attribute="~/folder/file.ext" />

The tilde I believe works the same way as having server.mappath, but again, I'm not 100% positive on this, but at least it's something you can look into.

thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.