ASP.NET - Dataset Error - Asked By Jahir on 12-May-12 09:17 AM

I add web reference and this is my API:

my code:

protected void Button1_Click(object sender, EventArgs e)


TGTravelServiceService ts = new TGTravelServiceService();

var data = ts.getStationList("", "samerafi");

GridView1.DataSource = data.stationList;



Here Dataset showing Empty In output

my gridview code:

<EmptyDataTemplate>No Records Found Maddy ! ! !</EmptyDataTemplate>


<asp:TemplateField HeaderText="originStationId">


<asp:Label ID="lbltour" runat="server" Text='<%#Eval("originStationId") %>' ></asp:Label></ItemTemplate > </asp:TemplateField>

<asp:TemplateField HeaderText="destinationStationId">


<asp:Label ID="lbltour" runat="server" Text='<%#Eval("destinationStationId") %>' > </asp:Label></ItemTemplate ></asp:TemplateField> </Columns>

The output shows Empty Dataset No REcords Found... What i do ? how to clear this error ?

Chintan Vaghela replied to Jahir on 12-May-12 09:25 AM


Because your StationDatalist is null.



Hope this helpful!





Jahir replied to Chintan Vaghela on 12-May-12 09:32 AM

this is my API i get that stationlist is from here... how to bring correct output here ?

[)ia6l0 iii replied to Jahir on 12-May-12 10:11 AM
I added a webreference and checked the data response. If you carefully see, the data.status.message returns the error code for the operation that you are trying to do. 

In this case, the error thrown is "One of access key parameter contain special characters". Please look below.

Reach out to the api owners. 

Hope this helps.
Jitendra Faye replied to Jahir on 12-May-12 10:24 PM
Yes, if you are using this code then it is returning null as result. I think this is because of username and password which you are passing in this line- var data = ts.getStationList("", "samerafi"); Check with your given username and password.
Jahir replied to [)ia6l0 iii on 14-May-12 12:39 AM
without conducting webservice manager how you get this output, i want also like that only... so pls tel me the step procedure what i want to do ? to bring output pls
Jahir replied to Jitendra Faye on 14-May-12 12:42 AM
username and password is correct i am given here,how to get this output, so pls tel me the step procedure what i want to do ? to bring output pls
Jahir replied to [)ia6l0 iii on 14-May-12 12:43 AM
so what i do for this error ? i am getting this type error so what i do ?
Jitendra Faye replied to Jahir on 14-May-12 10:46 AM
I have added reference of given service and I also didn't get any record related to data.stationList.

See this image-

In this returned result there is no stationlist object.
[)ia6l0 iii replied to Jahir on 14-May-12 11:34 AM
The webservice returns the "Code" and "Message" properties to indicate the error. Lookup the SDK of the web service, or contact the provider with the error message , I have shown in the screenshot. 

Also note that , as the above member suggests, triplist is null. But it is not because there are no "stations", always ensure that you read the "status" before you arrive at any conclusion.