home *** CD-ROM | disk | FTP | other *** search
ASP.NET Web Form | 2000-06-23 | 3.7 KB | 144 lines |
- <%@ Page Language="C#" %>
- <%@ Assembly Name="StockNet" %>
- <%@ Assembly Name="System" %>
- <%@ Assembly Name="System.Net" %>
- <%@ Import Namespace="System.Runtime.Remoting" %>
- <%@ Import Namespace="System.Net" %>
- <%@ Import Namespace="System.Text" %>
- <%@ Import Namespace="System.IO" %>
- <%@ Import Namespace="System.Collections" %>
- <%@ Import Namespace="StockNet" %>
-
- <html>
-
- <head>
-
- <script runat="server">
- String[] Symbols = {"MSFT", "AOL", "SUNW", "AAPL", "ORCL", "INTC", "CPQ", "DELL"};
-
- void quotes_change(Object Source, EventArgs E)
- {
- StockNet.StockQuote s = new StockNet.StockQuote();
- char[] sep = {';'};
-
- Symbols = symbol.Value.Split(sep);
- StockNet.Quote[] quotes = s.GetQuotes(Symbols);
- }
-
- </script>
-
- </head>
-
-
- <body style="font: 10pt verdana">
-
- <h3>SmartQuote </h3>
-
- <form runat="server">
-
- <font face="Verdana">
-
- <b>Please Select A Stock : </b>
-
- <INPUT id="symbol" VALUE="" TYPE="TEXT" runat="server" OnServerChange = "quotes_change">
-
- <p>
-
- <table>
- <tr>
- <td><font face="Verdana" size="6">
- <span id="QuoteSym" runat="server"/>
- </font> </td>
- <td><font face="Verdana" size="6">
- <span id="CompanyName" runat="server"/>
- </font></td>
- <td><font face="Verdana" size="6">
- <span id="QuoteVal" runat="server"/>
- </font></td>
- </tr>
- </table>
-
- </font>
-
- </form>
-
-
-
-
- <table cellpadding="1" cellspacing="1" width="100%" style="COLOR:
- black;FONT: 8pt verdana, arial" border="0" >
-
- <tr bgcolor="ffffff">
- <td style="padding-left:5" width="*" bgcolor="#b6cbeb"><b>Symbol</b></td>
-
- <td style="padding-left:5;padding-right:15" width="*" bgcolor="#b6cbeb"><b>LastTradePrice</b></td>
-
- <td style="padding-left:5;padding-right:15" width="*" bgcolor="#b6cbeb"><b>Company
- Name</b></td>
-
- <td style="padding-left:5;padding-right:15" width="*" bgcolor="#b6cbeb"><b>Partners</b></td>
-
- <td style="padding-left:5;padding-right:15" width="*" bgcolor="#b6cbeb"><b>Competitors</b></td>
-
-
- </tr>
-
- <% String symbol = "MSFT"; %>
-
- <% /* String[] symbols = {"MSFT", "AOL", "SUNW", "AAPL", "ORCL", "INTC", "CPQ", "DELL"}; */ %>
-
- <% String[] symbols = Symbols; %>
-
- <% /* StockQuote stockQuote = new StockQuote(); */ %>
-
- <% StockQuote stockQuote = new StockQuote(); %>
-
- <% Quote[] quotes = new Quote[1]; %>
-
- <% /* quotes[0] = stockQuote.GetQuote(symbol); */ %>
-
- <% /* quotes = stockQuote.GetQuotes(symbols); */ %>
-
-
- <% quotes = stockQuote.GetQuotes(symbols); %>
-
- <% for (int index=0;index < quotes.Length;index++) { %>
-
-
- <tr bgcolor="#eeeeee">
-
- <td style="padding-left:5"><%=quotes[index].Company.Symbol%></td>
-
- <td style="padding-left:5"><%=quotes[index].LastTradePrice%></td>
-
- <td style="padding-left:5"><%=quotes[index].Company.Name%></td>
-
- <td style="padding-left:5">
-
- <% Company company = quotes[index].Company; %>
-
- <% for (int indexPartners=0;indexPartners < company.Partners.Length;indexPartners++) {
- Company partner = company.Partners[indexPartners]; %>
- <%=partner.Symbol%><br>
- <% } %>
-
- </td>
-
- <td style="padding-left:5">
- <% for (int indexCompetitors=0;indexCompetitors < company.Competitors.Length;indexCompetitors++) {
- Company competitor = company.Competitors[indexCompetitors]; %>
- <%=competitor.Symbol%><br>
- <% } %>
- </td>
-
- </tr>
- <% } %>
-
- <TD>
-
- </table>
-
-
- </body>
- </html>
-