T
Trey Bean
I'm new to ASP.NET, but have been asked to create an ASP.NET app that
retrieves data from a third-party web service.
I've managed to connect and retrieve the data from the web service, but
am having trouble getting the returned data displayed on the resulting
web page. Well, at least how I want it displayed.
Currently, in the code-behind I have the a response object that has a
method 'actions' which is an array of type 'Action'.
In the main file, I am currently using a DataList like:
<asp
ataList id="actions" runat="server" >
<ItemTemplate>
<%# Eval("actionType") %>
<%# Eval("summary") %>
</ItemTemplate>
</asp
ataList>
And I bind to this in the code-behind with:
actions.DataSource = response.actions;
actions.DataBind();
This results in each action displayed in a table cell. I would prefer
each row to be comprised of two cells, like:
<tr>
<td>actionType</td>
<td>summary</td>
</tr>
How should I go about this? Is DataList even what I need to be using?
Thanks,
Trey
retrieves data from a third-party web service.
I've managed to connect and retrieve the data from the web service, but
am having trouble getting the returned data displayed on the resulting
web page. Well, at least how I want it displayed.
Currently, in the code-behind I have the a response object that has a
method 'actions' which is an array of type 'Action'.
In the main file, I am currently using a DataList like:
<asp
![Big Grin :D :D](/styles/default/custom/smilies/grin.gif)
<ItemTemplate>
<%# Eval("actionType") %>
<%# Eval("summary") %>
</ItemTemplate>
</asp
![Big Grin :D :D](/styles/default/custom/smilies/grin.gif)
And I bind to this in the code-behind with:
actions.DataSource = response.actions;
actions.DataBind();
This results in each action displayed in a table cell. I would prefer
each row to be comprised of two cells, like:
<tr>
<td>actionType</td>
<td>summary</td>
</tr>
How should I go about this? Is DataList even what I need to be using?
Thanks,
Trey