Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 by Chris Hart, John Kauffman, David Sussman, Chris Ullman; ISBN: 9780764588501
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 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 September 1st, 2006, 02:08 PM
Authorized User
 
Join Date: Aug 2006
Location: , , .
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default Beginning ASP.NET 2.0 with C# - Chapter09 pg 295

Beginning ASP.NET 2.0 with C# - Chapter09 pg 295

Try it out: Step 4: Double-click the button to create the code-behind file and the button click event

This is done and I am getting:
Partial Class SimpleTypes
    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

    End Sub
End Class


When I look the END Chapter09 SimpleTypes.aspx.cs file I am seeing something like this:
using System;

partial class SimpleTypes : System.Web.UI.Page
{
    protected void Button1_Click(object sender, System.EventArgs e)
    {
        Label1.Text = TextBox1.Text + TextBox2.Text;
        Label2.Text = DateTime.Parse(TextBox3.Text).ToString("dd MMM yyyy");
        Label3.Text = DateTime.Parse(TextBox3.Text).ToString();
    }
}

What is causing me to see something completely different?

Also I noticed that when the button was added and I compared it to the file in the END Chapter09 directory they were not the same

I had in my SimpleTypes.aspx file:
<asp:Button ID="Button1" runat="server" Text="Button" /></div>

END Chapter09: had in its file SimpleTypes.aspx
 <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /></div>

Should there not be a step indicating one needs to add an Event to the button selecting the action “Click” and adding “Button1_Click”?


  #2 (permalink)  
Old September 1st, 2006, 02:35 PM
Authorized User
 
Join Date: Jan 2006
Location: , , .
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Your code behind file is in VB.

Try recreating the page and specifying C#.
 


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
Pg 16 B. Asp.net 2.0 w/ C# GREEN ARROW? Astrocloud ASP.NET 2.0 Basics 2 March 17th, 2008 06:03 AM
asp.net 2.0 (VB) error try it out ch 5 pg 160 rdixon2005 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 January 10th, 2008 02:37 PM
Beginning ASP.NET 2.0 with C# - Chapter09 pg 294 tbroom BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 September 1st, 2006 01:04 PM
Beginning ASP.NET 2.0 with C# - Chapter08 pg 280 tbroom BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 September 1st, 2006 10:50 AM
Beginning MX 2004 pg. 221 Beth Ellen Dreamweaver (all versions) 3 May 14th, 2005 06:12 AM



All times are GMT -4. The time now is 03:59 PM.


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