Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Consume WebService Dataset

Thread Tools

Consume WebService Dataset

Posts: n/a
Hi, I am new to Web Development.
Using Framework 2.0
Written a webservice that exposes a typed dataset and a webmethod that
returns an instance of the typed dataset.

On the client aspx page I can't see how to hook an instance of the dataset
to a datasource.
The objectDatasource configure wizard shows localhost.MyTypedDataset in a
number of options.
I assumed that I should choose 'localhost.MyTypedDataset +MyTable'
The page displays, but where I would expect the datagrid there is just white
The page_load code is below as is the Page Body xml

Am I on the write track?
public partial class FirstWebPage : System.Web.UI.Page


localhost.Service d;

localhost.dsMeter ds;

protected void Page_Load(object sender, EventArgs e)


d = new Service();

ds = d.GetMeters();

Label1.Text = "Success";


protected void Button1_Click(object sender, EventArgs e)




**********************XML BODY FOLLOWS******************

<form id="form1" runat="server">


<strong>Welcome to Visual Web Developer Using Code Separation</strong>.<br

<br />

<strong>Enter your name:</strong>.<br />

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

<asp:Button ID="Button1" runat="server" Text="Display Name"
OnClick="Button1_Click" />

<asp:Label ID="Label1" runat="server" Text=""></asp:Label>

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
AllowPaging="True" DataSourceID="ObjectDataSource1"


<asp:CommandField ShowEditButton="True" ShowSelectButton="True" />

<asp:BoundField DataField="apartmentBlock" HeaderText="apartmentBlock"
SortExpression="apartmentBlock" />

<asp:BoundField DataField="apartment" HeaderText="apartment"
SortExpression="apartment" />

<asp:BoundField DataField="meter_number" HeaderText="meter_number"
SortExpression="meter_number" />

<asp:BoundField DataField="supplier_id" HeaderText="supplier_id"
SortExpression="supplier_id" />

<asp:CheckBoxField DataField="HasErrors" HeaderText="HasErrors"
ReadOnly="True" SortExpression="HasErrors" />

<asp:BoundField DataField="id" HeaderText="id" SortExpression="id" />

<asp:BoundField DataField="RowError" HeaderText="RowError"
SortExpression="RowError" />



<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="FindByid" TypeName="localhost.dsMeter+MeterDataTable"


<asparameter Name="table" Type="Object" />

<asparameter Name="preserveChanges" Type="Boolean" />



<asp:ControlParameter ControlID="GridView1" Name="id"

Type="Int32" />





Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
consume local web service -ok consume remote service - Not OK dgleeson422111 ASP .Net Web Services 2 01-31-2010 08:02 PM
Consume Webservice in java weetat Java 3 04-04-2007 07:04 AM
Consume php webservice in Paul Hermans ASP .Net 1 06-10-2004 05:40 PM
How does a java client consume .net DataSet datatype in a web service ASP .Net 2 05-19-2004 02:11 PM
can javascript function consume webservice that returns dataset? Timo ASP .Net Web Services 2 01-10-2004 12:58 PM