How do I call a web service to get xml data displayed in a treeview in asp.net -


i trying use asp:dropdownlist control able choose values local database have created within app_data folder. stock exchange symbols. when select symbol list, want treeview appear xml information provided web service. have referenced web service in app_webreferences, not know how call information. appreciated.

this have far, , calling database of symbols completed.

   <%@ page language="c#" autoeventwireup="true" codefile="default.aspx.cs" inherits="_default" %>  <!doctype html>  <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <body>      <form id="form1" runat="server">     <div>          <asp:dropdownlist             id="dropdownlist1"             runat="server"             autopostback="true"             datasourceid="sqldatasource1"             datatextfield="symbol"             datavaluefield="symbol"             appenddatabounditems="true">              <asp:listitem text="select one" value="" />          </asp:dropdownlist>          <asp:treeview id="treeview1" runat="server">             </asp:treeview>          <asp:sqldatasource              id="sqldatasource1"              runat="server"              connectionstring="<%$ connectionstrings:connectionstring %>"              selectcommand="select [symbol] [table]">         </asp:sqldatasource>        </div>     </form> </body> </html> 

you can bind treeview code behind using function call on dropdown's selected index change event.

on can call web service give list of records , can bind record in tree view using function.

it bit easy do.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -