WEB Service help needed

?

. .

Hi

I would like to have some help with web service . I have a ASPX page
with four buttons . Each of the button will pull some data from SQL
Server database and show on the web page . When a user will click on the
button they the button will puu the data and show on the web page . I
have to pull the data from the database through Web service . I have
stored procedure written in SQL Server . How do I write a web service
that will access the stored procedure and pull the data to the web page
when a user click on a button

Thanks
 
O

oraclevsmicrosoft

Thats sounds that you know little from Web Services.
In order to create your Web Service have a look to:

http://msdn.microsoft.com/webservices/webservices/understanding/

Typically you will have to :

- create a .Asmx page ,(use the visual studio template) on your web
server
- Implement a web method which return a dataset type
This will look like (C#):

[ WebMethod(Description="this return a dataSet from the SQL Server"]
public DataSet myWebMethod(string p1,string p2)
{
DataSet myDataset;
....

return myDataset
}
- compile it
- add to your ASPX projet a web reference to the web service file
(ie the URL of the asmx file)and name the reference (for instance
myWebServiceClient)
- call the web service with a code like this onein your ASPX :
myWebServiceClient sw = new myWebServiceClient();
dataset myclientdataset = sw.myWebMethod(p1,p2);

Hope this helps!

Marc Boizeau

Http://oraclevsmicrosoft.blogspot.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top