Dataset Error

Discussion in 'ASP.NET / ASP.NET Core' started by maddyrafi, May 14, 2012.

  1. This is my API:

    http://staging.ticketgoose.com/bookbustickets/services/TGSWS?wsdl i want getTripList from this webservice


    i add web reference and add this code in default.cs,

    protected void Button1_Click(object sender, EventArgse)

    {

    TGTravelServiceService ts = new TGTravelServiceService();

    var data = ts.getTripList("[email protected]", "samerafi", "72", "71", "21/05/2012");

    GridView1.DataSource = data.stationList;

    GridView1.DataBind();

    }

    in design page i put 1 button and write this above shown code, in default.aspx gridview source code i write this code:

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

    <asp:TemplateField HeaderText="userId">

    <ItemTemplate>

    <asp:Label ID="lbluserId" runat="server" Text='<%#Eval("userId") %>' ></asp:Label>//what i want to give here ? {this one userId or [email protected] } </ItemTemplate >

    </asp:TemplateField>

    <asp:TemplateField HeaderText="pwd">

    <ItemTemplate>

    <asp:Label ID="lblpwd" runat="server" Text='<%#Eval("pwd") %>' ></asp:Label>

    </ItemTemplate >

    </asp:TemplateField>

    <asp:TemplateField HeaderText="originStationId">

    <ItemTemplate>

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

    </ItemTemplate >

    </asp:TemplateField>

    <asp:TemplateField HeaderText="destinationStationId">
    <ItemTemplate>

    <asp:Label ID="lbldestinationStationId" runat="server" Text='<%#Eval("destinationStationId") %>' ></asp:Label>

    </ItemTemplate >

    </asp:TemplateField>

    <asp:TemplateField HeaderText="travelDate">

    <ItemTemplate>

    <asp:Label ID="lbltravelDate" runat="server" Text='<%#Eval("travelDate") %>' ></asp:Label>

    </ItemTemplate >

    </asp:TemplateField>

    </Columns>

    it shows empty no records found in output, What i do ? pls provide me solution ?
     

Share This Page