Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 8th, 2010, 04:47 PM
Friend of Wrox
 
Join Date: Mar 2010
Posts: 99
Thanks: 21
Thanked 6 Times in 4 Posts
Default BasePage Question

Hello,

I am at the page 212.. and you tell us to replace all the System.Web.UI.Page with BasePage. It is all the files including thoses in Demos folder ?

Thanks.

Last edited by Rushino; April 8th, 2010 at 04:51 PM..
 
Old April 8th, 2010, 05:01 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yes, if you want to, you can. By using Find and Replace, you replace all instances of System.Web.UI.Page, and thus the ones in the Demos folder as well. To be able to run them, you need to give them a valid title.

Before you edited your post, you said you had compile time errors. Is that still the case? If so, can you post the markup and code behind of one of the pages that generates an error? (Please use the code formatting toolbar on the editor when posting).

Hope you're enjoying the book.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old April 8th, 2010, 05:12 PM
Friend of Wrox
 
Join Date: Mar 2010
Posts: 99
Thanks: 21
Thanked 6 Times in 4 Posts
Default

Well, at first i wanted to ask the question ive asked now.. but after executing the files in the Demos folder using the "Start Debugging" (Green Arrow of IDE) i found that the error is raised from the IDE, an exception was raised there about the title and not in the browser so i wondered why cause doing the same for the login.aspx or default.aspx result in the executing inside the browser..

So when i use the "Debugging" I though that the small green arrow was the same as CTRL+F5 but look like i was wrong. The green arrow execute code inside the IDE which CTRL+F5 run the code in the browser by launching it. However, using that green arrow for the login.aspx and default.aspx work perfectly.. but using it for the files inside the Demos folder... cause problems or errors.. i still wonder why ?

Anyway the Green arrow is confusing.. cause it look like it mean "Run"..

Last edited by Rushino; April 8th, 2010 at 05:19 PM..
 
Old April 8th, 2010, 05:26 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

F5 (green arrow) means: Compile, and run with the debugger enabled
Ctrl+F means: Compile, and run without the debugger enabled

Both should compile the applicaton (if it's an ASPX page you're requesting)

Chapter 18 digs deeper into compilation and debugging.

What errors are you getting?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old April 8th, 2010, 05:30 PM
Friend of Wrox
 
Join Date: Mar 2010
Posts: 99
Thanks: 21
Thanked 6 Times in 4 Posts
Default

So with the debugger enabled its gonna keep trace of error inside the IDE and without it enabled it gonna execute in the browser. I am right ?

Well the error i was getting are the exception we created. No worry.
 
Old April 8th, 2010, 05:41 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
So with the debugger enabled its gonna keep trace of error inside the IDE and without it enabled it gonna execute in the browser. I am right ?
Both options do a compilation, and thus any compile time errors (syntax errors and so on) are shown in Visual Studio before you're even able to run the page in the browser. However the behavior for the BasePage should indeed result in a runtime, and not a compile time error.

What you may be seeing is that Visual Studio breaks into your code when you debug (by using F5), showing you the line that throws the error. This is normal behavior (and very useful when tracking down bugs). When you then press F5 again, you should see the error message appear in the browser. When using Ctrl+F5, you will see the error in the browser directly. It's still being caused by a run-time error at the server (e.g. the browser just displays the error message), but Visual Studio doesn't intercept it, and doesn't show you where the error occurred.

Does this help?

mar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
Rushino (April 8th, 2010)
 
Old April 8th, 2010, 05:47 PM
Friend of Wrox
 
Join Date: Mar 2010
Posts: 99
Thanks: 21
Thanked 6 Times in 4 Posts
Default

Yes. Thanks.

Aslo.. i am impressed so far about how ASP.NET 4 is useful and easier than PHP in many ways.
 
Old April 8th, 2010, 06:03 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

That's good to hear. And how do you like the book?
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old April 8th, 2010, 06:19 PM
Friend of Wrox
 
Join Date: Mar 2010
Posts: 99
Thanks: 21
Thanked 6 Times in 4 Posts
Default

I love it ! I just can't wait to get through it ! It is very pleasant to read and it is probably one of the best books ive read so far. Be sure that i will review it on amazon as soon as i finish it and so far it deserve 5 stars. Its sad that the cover got a bit damaged through the transport but well doesnt matter its minor.

Last edited by Rushino; April 8th, 2010 at 06:22 PM..
 
Old April 9th, 2010, 12:48 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Excellent!. Looking forward to your review.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!




Similar Threads
Thread Thread Starter Forum Replies Last Post
Am I understanding how the BasePage is called up? kiwibrit BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 November 11th, 2009 05:08 AM
Reference to BasePage member4953 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 March 27th, 2009 01:45 PM
BasePage & MasterPage Rachel BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 December 25th, 2008 11:23 AM
BasePage Code for VB (Chapter 6) justinjones06 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 September 15th, 2008 01:50 AM
BasePage and Namespace Issue Eric S. Smith BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 May 28th, 2008 08:43 AM





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