Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 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
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 31st, 2008, 09:40 AM
Registered User
Join Date: Jul 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default error rendering control pnlAddEdit in Wrox Blog


    I am using the code from the ASP.Net Instant Results book for the Wrox Blog. I am using Visual Web Developer 2005 Express.

On the Default Page, one of the controls is giving the following error in design view:

Error Rendering COntrol pnlAddEditBlogEntry An unhandled exception has ocured Request is not available in this context.

I am able to view in a browser and log into the Blog application. The button for creating entries does not show up, even when I am logged in with a user that is a part of the administrators role.

What do I need to do to correct this??? I am fairly new so I am probably missing something simple.....


Reply With Quote
  #2 (permalink)  
Old July 31st, 2008, 09:47 AM
Friend of Wrox
Join Date: Mar 2007
Location: Hampshire, United Kingdom.
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post

Hi Tommy,

The problem here is that at design time there is no "Request" (that being a request to the server from a browser. At that point, there is not even a server!).

From the sounds of it, you have a control that will render differently dependant on information in the request? I would say check for the request being null and acting accordingly..
if (Request== null)
// Do Default
// Do what you are currently doing
Edit: Code added for clarity.

Hope this helps,

Reply With Quote
  #3 (permalink)  
Old July 31st, 2008, 10:48 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts

Hi there,

First of all, if this is related to the book "ASP.Net Instant Results", you're probably better off posting in the book's forum here at p2p.wrox.com.

That said, can you give us more details? Do you get this in Design View only or in the browser as well? What's the exact error message? (I doubt Microsoft spelled ocured wrong :)) What web server are you using How did you install the application? Manually as explained in the book or did you use the installer? Are you on Vista?

And so on. With this information, it'll be easier to track down the problem and help you fix it.

It's strange this happens in Design View as the code using Request is all written to fire at run-time. Have you applied the latest VWD service pack?



Imar Spaanjaars
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote

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
Wrox Blog in C# madAlan BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 22 June 12th, 2011 04:09 AM
Wrox Blog tblessed23 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 16 May 14th, 2007 04:08 PM
Wrox Blog: Viewing individual blog entries Tawanda BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 7 May 7th, 2007 12:06 PM
Wrox Blog - error message runtime highspeedwire BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 7 August 10th, 2006 03:21 PM
Error rendering Validator control bmains General .NET 0 July 27th, 2005 03:45 PM

All times are GMT -4. The time now is 08:32 AM.

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