Click here to Skip to main content
15,899,124 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends,

I have few images in one IP address , i need to display that images in my application page for that i have declared that Ip Address in DocumentsPaths of my web.config file but i am not able access those images .Please look at the code below which i have mentioned in my web.config file ,
<add key="Documentspath" value="http://192.168.0.88/syed sw/">
Can any one suggest me to provide the correct code to access the Ip address in my DocumentsPath of web.config file ?



Regards,
SARAVANA.M
Posted
Updated 26-Aug-11 20:19pm
v2

1 solution

under appsettings in your web.config add one more key Eg:


<add key="my_ip_address" value="192.168.10.1"/>



and in you code you can use this key as follows

string ip_path = System.Configuration.ConfigurationManager.AppSettings ["my_ip_address"].ToString();



This way you can get you ip address in a string, customize this as per your requirement, this is just an example.


I hope this will help you out.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900