Sunday, July 3, 2011

reading url form web.config (wcf service)

In Web.config:

 <appSettings>
    <add key="wsUrl" value="http://192.168.1.7:650/CafeService.svc"/>
  </appSettings>

in the .aspx page declare a globle variable

var wsurl;

in document.ready

 wsurl = '<%=ConfigurationManager.AppSettings["WsUrl"].ToString() %>';

No comments:

Post a Comment