JackBurton07
IS-IT--Management
Hi there
Im new to web services and am trying to set up a web client form in asp.net/VS 2005 that reads stock symbol and displays the relevant stock information from the web service. I can get the stock data pulled from the web service but when is displayed in the broswer its just all along one line. Im not sure how I can put it into a table to make it more readable. I reserached maybe I need to use a data grid however I dont know what kind of code to use...
Please help! Here's my code for the form:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class stockfolder_Default : System.Web.UI.Page
{
StockWebService.StockQuote ws;
protected void Page_Load(object sender, EventArgs e)
{
Page.RegisterHiddenField("__EVENTTARGET", "Button1");
ws = new StockWebService.StockQuote();
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
Label2 .Text = ws.GetQuote(TextBox1.Text);
}
catch
{
Label2.Text = "Invalid Ticker Symbol";
}
}
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
}
}
And I'm using for the web service.
Thanks
Jack
Im new to web services and am trying to set up a web client form in asp.net/VS 2005 that reads stock symbol and displays the relevant stock information from the web service. I can get the stock data pulled from the web service but when is displayed in the broswer its just all along one line. Im not sure how I can put it into a table to make it more readable. I reserached maybe I need to use a data grid however I dont know what kind of code to use...
Please help! Here's my code for the form:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class stockfolder_Default : System.Web.UI.Page
{
StockWebService.StockQuote ws;
protected void Page_Load(object sender, EventArgs e)
{
Page.RegisterHiddenField("__EVENTTARGET", "Button1");
ws = new StockWebService.StockQuote();
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
Label2 .Text = ws.GetQuote(TextBox1.Text);
}
catch
{
Label2.Text = "Invalid Ticker Symbol";
}
}
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
}
}
And I'm using for the web service.
Thanks
Jack