Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 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 Professional 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
  #1 (permalink)  
Old June 26th, 2006, 06:09 AM
Authorized User
 
Join Date: May 2005
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default webparts code problems (p643)

I've just started reading chapter 17 (Portal Frameworks and Web Parts) and there is some code on p643 that produces an error :

WebPartManager1.SupportedDisplayModes(DropDownList 1.SelectedValue.ToString());

Error : 'System.Web.UI.WebControls.WebParts.WebPartManager .SupportedDisplayModes' is a 'property' but is used like a 'method'

Can anybody help?

  #2 (permalink)  
Old November 7th, 2006, 06:36 AM
Registered User
 
Join Date: Nov 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

try this


 protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {

        switch (DropDownList1.SelectedValue)
        {
            case "Browse":
                Webpartmanager1.DisplayMode = WebPartManager.BrowseDisplayMode;
                break;
            case "Design":
                Webpartmanager1.DisplayMode = WebPartManager.DesignDisplayMode;
                break;
            case "Edit":
                Webpartmanager1.DisplayMode=WebPartManager.EditDis playMode;
                break;
            case "Catalog":
                Webpartmanager1.DisplayMode = WebPartManager.CatalogDisplayMode;
                break;

        }


    }



Similar Threads
Thread Thread Starter Forum Replies Last Post
Are Webparts running only with IE ? mrf ASP.NET 2.0 Basics 1 July 24th, 2010 08:45 AM
WebParts not working at all... Jurjen BOOK: Professional Web Parts and Custom Controls ASP.NET ISBN: 0-7645-7860-X 3 April 10th, 2008 03:51 PM
ADS authentication for using Webparts ayyub123 ASP.NET 2.0 Basics 0 May 29th, 2007 11:34 PM
webparts authentication ayyub123 ASP.NET 2.0 Basics 0 May 28th, 2007 12:53 AM
Verbs not showing on WebParts skafando BOOK: Professional Web Parts and Custom Controls ASP.NET ISBN: 0-7645-7860-X 1 December 11th, 2006 10:01 PM





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