|
|
 |
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.
|
 |

June 5th, 2009, 09:56 AM
|
|
Registered User
|
|
Join Date: Apr 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
On page 799 the code doesn't seem to work?
Quote:
protectedvoid 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.
|

June 5th, 2009, 10:41 AM
|
|
Registered User
|
|
Join Date: Apr 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Is it possible that WebParts must be WebPartDisplayMode?
|

June 22nd, 2009, 10:09 AM
|
|
Registered User
|
|
Join Date: Apr 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
To bad nobody gives me a reaction.
|

July 9th, 2009, 07:01 AM
|
|
Registered User
|
|
Join Date: Jul 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Same issue.. D code does'nt work
I am getting d same sort of errors as you are..
Any breakthrough???
Do reply
|

July 9th, 2009, 07:11 AM
|
|
Registered User
|
|
Join Date: Jul 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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 |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |