p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP.NET 3.5 > BOOK: Professional ASP.NET 3.5 SP1 Edition: In C# and VB
I forgot my password Register Now
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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 5th, 2009, 09:56 AM
Registered User
Points: 20, Level: 1
Points: 20, Level: 1 Points: 20, Level: 1 Points: 20, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2009
Posts: 5
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old June 5th, 2009, 10:41 AM
Registered User
Points: 20, Level: 1
Points: 20, Level: 1 Points: 20, Level: 1 Points: 20, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is it possible that WebParts must be WebPartDisplayMode?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old June 22nd, 2009, 10:09 AM
Registered User
Points: 20, Level: 1
Points: 20, Level: 1 Points: 20, Level: 1 Points: 20, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

To bad nobody gives me a reaction.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old July 9th, 2009, 07:01 AM
Registered User
Points: 9, Level: 1
Points: 9, Level: 1 Points: 9, Level: 1 Points: 9, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #5 (permalink)  
Old July 9th, 2009, 07:11 AM
Registered User
Points: 9, Level: 1
Points: 9, Level: 1 Points: 9, Level: 1 Points: 9, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

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 05:48 PM
code clinic - Why wont example asp code work? jardbf Classic ASP Basics 3 April 27th, 2006 07:22 PM
code does not work keithschm Beginning PHP 5 January 10th, 2005 09:52 AM
Getting Code To Work jmrSudbury BOOK: Professional ASP.NET 1.0, Special Edition/1.1 3 June 22nd, 2004 04:59 PM
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 03:37 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc