Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > BOOK: Beginning ASP.NET 1.0
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 1.0
This is the forum to discuss the Wrox book Beginning ASP.NET 1.0 with C# by Chris Goode, John Kauffman, Christopher L. Miller, Neil Raybould, S. Srinivasa Sivakumar, Dave Sussman, Ollie Cornes, Rob Birdwell, Matt Butler, Gary Johnson, Ajoy Krishnamoorthy, Juan T. Llibre, Chris Ullman; ISBN: 9780764543708
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 1.0 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 27th, 2004, 03:54 AM
Registered User
 
Join Date: May 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 10 Navigator.aspx problem

Hi,

I am working on the Try it Out example - Navigator.aspx. Following is the code I copied from the book:

<%@ page Language="c#" %>

<script Language="c#" runat="server">

void Page_Load(object source, EventArgs e)
{
    if (!IsPostBack)
    {
        MyButton.Text = "OK";
        MyDropDownList.Items.Add("http://www.microsoft.com");
        MyDropDownList.Items.Add("http://www.wrox.com");
        MyDropDownList.Items.Add("http://msdn.microsoft.com");
    }
}
</script>

<html>
<body>
    <form id="WebForm1" method="post" runat="server">
        <asp:DropDownList ID=MyDropDownList runat="server" />
        <asp:button ID=MyButton runat="server" Text="" />
    </form>
</body>
</html>

When I open it from the browser I should see the button with 'OK' and the three urls in the dropdown list. But that's not happening. I can't see anything. If I take away the '!' mark from
if (!(IsPostBack)) statement [which is [if (IsPostBack)], I can see the button with 'OK' and the 3 urls. If I click the OK button it will add another 3 urls to the dropdown list. Could anybody tell what is going on here. Thanks a lot.

 


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
chapter 10 problem nikItas BOOK: Beginning Access 2003 VBA 1 August 5th, 2008 08:54 AM
Chapter 10 problem rstoos Beginning PHP 1 September 16th, 2006 01:14 PM
Chapter 10 login problem Dennis Mollet BOOK: Beginning VB.NET Databases 1 August 18th, 2005 04:07 AM



All times are GMT -4. The time now is 03:04 AM.


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