Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 3rd, 2003, 09:21 PM
Registered User
 
Join Date: Jun 2003
Location: Sloatsburg, NY, USA.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Stock Quote

I am building a site that gets a stock quote for a user, i would like to know the easiest way to accomplish this, using ASP.NET. The user would type a symbol into a textbox then hit a button and taken to the page that contains the quote. I am having a hard time figuring out the best way to do this.

Jon
Reply With Quote
  #2 (permalink)  
Old June 3rd, 2003, 09:43 PM
Authorized User
 
Join Date: Jun 2003
Location: Lexington, KY, USA.
Posts: 46
Thanks: 0
Thanked 1 Time in 1 Post
Default

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');")
   return
else
   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.

-Van
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stock feed hudeanee Excel VBA 1 July 24th, 2007 08:29 PM
stock management- closing stock and opening stock bright_mulenga Access 1 July 16th, 2007 07:11 AM
Available... Units in Stock j-parker BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 December 24th, 2006 07:27 PM
Stock Quote automation aragrigorian BOOK: Expert One-on-One Access Application Development 0 May 24th, 2005 04:52 PM



All times are GMT -4. The time now is 05:39 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.