Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > BOOK: Professional ASP.NET 3.5 SP1 Edition: In C# and VB
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET 3.5 SP1 Edition: In C# and VB
This is the forum to discuss the Wrox book Professional ASP.NET 3.5 SP1 Edition: In C# and VB by Bill Evjen, Scott Hanselman, and Devin Rader; ISBN: 9780470478264
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 3.5 SP1 Edition: In C# and VB 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 June 5th, 2009, 08:56 AM
Registered User
 
Join Date: Apr 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default On page 799 the code doesn't seem to work?

Quote:

protected
void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
WebParts.WebPartdisplayMode wpDisplayMode= WebPartManager1.SupportedDisplayModes[DropDownList1.SelectedValue.ToString()];
WebPartManager1.DisplayMode = wpDisplayMode;
}

protectedvoid Page_Init(object sender, EventArgs e)
{
foreach (WebPartDisplayMode wpMode in WebPartManager1.SupportedDisplayModes)
{
string modeName = wpMode.Name;
ListItem dd_ListItem = newListItem(modeName, modeName);
DropDownList1.Items.Add(dd_ListItem);
}
}
I get an compiler error on " WebParts" -->
Error 2 The type or namespace name 'WebParts' could not be found (are you missing a using directive or an assembly reference?) C:\..\Visual Studio 2008\WebSites\..\MasterPage.master 11 13 C:\...\..\

Is it I do or is there something wrong in the code?

Thx.
  #2 (permalink)  
Old June 5th, 2009, 09:41 AM
Registered User
 
Join Date: Apr 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is it possible that WebParts must be WebPartDisplayMode?
  #3 (permalink)  
Old June 22nd, 2009, 09:09 AM
Registered User
 
Join Date: Apr 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

To bad nobody gives me a reaction.
  #4 (permalink)  
Old July 9th, 2009, 06:01 AM
Registered User
 
Join Date: Jul 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Same issue.. D code does'nt work

I am getting d same sort of errors as you are..
Any breakthrough???
Do reply
  #5 (permalink)  
Old July 9th, 2009, 06:11 AM
Registered User
 
Join Date: Jul 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default D reason

The reason 4 my errors was the square brackets...
but they seem to be correct in your code..
Itz working fine..
try again
 


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
why this code does not work ? sandeepgreaternoida BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 April 12th, 2009 04:48 PM
code clinic - Why wont example asp code work? jardbf Classic ASP Basics 3 April 27th, 2006 06:22 PM
code does not work keithschm Beginning PHP 5 January 10th, 2005 09:52 AM
Code from Book did not work! mnongkhlaw Classic ASP Databases 0 October 27th, 2003 07:30 AM



All times are GMT -4. The time now is 09:15 AM.


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