Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Asp.NET Web Service Client

Status
Not open for further replies.

JackBurton07

IS-IT--Management
Oct 17, 2007
75
GB
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
 

Try forum855 - this is for Classic ASP questions

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top