Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET NET
Hello, friends.
Please help me.
i have a web service, that execute stored procedure, and return data set:
 
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Data.SqlClient;
using System.Data;
using System.Web.Configuration;
using System.Xml;
 

namespace usingparameterwebservice
{
    /// <summary>
    /// Summary description for mywebservice
    /// </summary>
    [WebService(Namespace = "create_request")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
    // [System.Web.Script.Services.ScriptService]
    public class Service1 : System.Web.Services.WebService
    {
        string constring = WebConfigurationManager.ConnectionStrings["Name"].ToString();
        SqlConnection conn;
        SqlCommand comm;
 
 [WebMethod(Description = "Просмотр заявки")]
        public DataSet Select(string Reques_id, string nameproc)
        {
 
            SqlConnection myConn = new SqlConnection(constring);
            SqlDataAdapter myData = new SqlDataAdapter(nameproc, myConn);
            myData.SelectCommand.CommandType = CommandType.StoredProcedure;
            myData.SelectCommand.Parameters.Add(new SqlParameter("@id", SqlDbType.Char, 5));
            myData.SelectCommand.Parameters["@id"].Value = Reques_id;
 

            DataSet ds = new DataSet();
            myData.Fill(ds);
 
            return ds;
           }
    }
}
 
The stored procedure do simple select
 
I need to do a aspx page, where will be a table with data from stored procedure.
How to call web service and retrieve data in normal view from web-service.
 
Please help!
Posted 7-May-13 22:40pm
Alexrf361

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  

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

  Print Answers RSS
0 OriginalGriff 304
1 Sergey Alexandrovich Kryukov 295
2 Shweta N Mishra 216
3 Maciej Los 210
4 PIEBALDconsult 184
0 OriginalGriff 7,630
1 Sergey Alexandrovich Kryukov 7,022
2 DamithSL 5,586
3 Manas Bhardwaj 4,946
4 Maciej Los 4,525


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 8 May 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100