Wednesday, December 28, 2011

how to create a proxy from webservice?

There are two ways to create proxy from web Service:

1. Add web reference in your web application and use them.


2. Open the command prompt of visual studio and copy & paste bellow mentioned line:

For VB
=====
wsdl /language:VB /n:"<destination>" http://<source&lgt;?WSDL

For C# 
=====
wsdl /language:CS /n:"<destination>" http://
<source&lgt;?WSDL

Friday, December 2, 2011

how to download a file

        Response.ContentType = "application/pdf";
        Response.AppendHeader("Content-Disposition", "attachment; filename=aaa-13.pdf");
        Response.TransmitFile(Server.MapPath("~/Image/UserDetails-13.pdf"));
        Response.End();