Thread: Stock Quote
View Single Post
Old June 3rd, 2003, 09:43 PM
vknowles vknowles is offline
Authorized User
Join Date: Jun 2003
Location: Lexington, KY, USA.
Posts: 46
Thanks: 0
Thanked 1 Time in 1 Post

If I understand you correctly, what you need is a server-side text box (ie, runat=server) and a server-side button.

Say your page is called "entry.aspx". The text box ID is "TextBox1" and the button ID is "Button1".

In the code-behind (entry.aspx.vb) you will have an event handler for the Button1_onclick event. It might look like this in VB.NET:

if TextBox1.text = "" then
   RegisterClientScriptBlock("X","alert('Please enter a stock symbol');")
   Response.Redirect("display.aspx?symbol=" & TextBox1.text)
end if

You then have a page "display.aspx" that uses the querystring to determine which stock quote to display.

Or, if you have hard-coded pages, you just replace that else ... section with a select case TextBox1.text structure and redirect to the appropriate page.

I don't know if this is what your stuck on... I hope it helps.