08.01.2015 Views

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

30<br />

CHAPTER 2 ■ BASICS OF WEB DEVELOPMENT WITH <strong>ASP</strong>.<strong>NET</strong><br />

For the stock quote application you are creating, set the properties of the three<br />

controls as follows:<br />

TextBox: Change the ID to txtTicker.<br />

Button: Change the ID to btnGet, <strong>and</strong> change the text to Get.<br />

Label: Change the ID to lblQuote, <strong>and</strong> change the text to '' (an empty string).<br />

The page will now look something like what you see in Listing 2-1.<br />

Listing 2-1. The Stock Quote Application<br />

<br />

<br />

<br />

<br />

Untitled Page<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

You can see the labels for the three controls as well as their attributes, which<br />

define the properties that you just set. If you don’t want to use the Property Editor to set<br />

the properties, you can instead use the source editor to enter these properties manually,<br />

<strong>and</strong> IntelliSense will even help you with this.<br />

If you haven’t done so already, make sure that you add a web reference to the<br />

XMethods quote service at www.swan<strong>and</strong>mokashi.com/HomePage/<strong>Web</strong>Services/StockQuotes.<br />

asmxWSDL. Call the service reference 'QS'.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!