How to add service reference dynamically from user control? Microsoft Ajax
First, Create a web page default.aspx and put the html code as following.. ————————————————————————— ————————————————————————– Now, Create a usercontrol my first user control Create a function called AddScriptReference as following… ‘————————————————————————– private void AddScriptReference() { ScriptManager scriptManger = ScriptManager.GetCurrent(this.Page); if (scriptManger != null) { ServiceReference serviceReference = new ServiceReference(); serviceReference.Path=”~/MyWebService.asmx”;