To write the code in C

• Right-click on the Servicel.asmx page and click on View Code to display the code view for the page. Add the following code under the Component Designer Generated Code section to create the Web Service.

[Visual Basic]

Description:="Returns a products report grouped by category")> Public Function GetProductsReport() As Byte() Dim rpt As New rptProducts() rpt.Run()

Return rpt.Document.Content End Function

[WebMethod(Description="Returns a products report grouped by category")]

public Byte[] GetProductsReport() {

rptProducts rpt = new rptProducts(); rpt.Run();

return rpt.Document.Content;

0 0

Post a comment