January 8th, 2009, 01:32 AM
Join Date: Feb 2005
Location: Pune, Maharashtra, India.
Thanked 1 Time in 1 Post
WebPart not supporting/enabled displaymode other than "Browse"
I am trying sample from http://msdn.microsoft.com/en-us/library/kswx7h7e.aspx
for creating webpart page. Basically its just a small application demonstrating use of webparts. Using MS VS 2008 with 2.0 framework.
I have following code in Page_InitComplete event handler.
_manager = WebPartManager.GetCurrentWebPartManager(Page);
string browserModeName = WebPartManager.BrowseDisplayMode.Name;
// Fill the drop-down list with the names of supported display modes.
foreach (WebPartDisplayMode mode in _manager.SupportedDisplayModes)
String ModeName = mode.Name;
// Make sure a mode is enabled before adding it.
ListItem li = newListItem(ModeName,ModeName);
When I ran this application - i see only Browse mode avialable on machine. Is there any extra setting i need to do?
I am currently learning webparts , so please help me.
When i debugged this , at foreach statement i get two display modes but only browse mode is enabled , why so?
Is there any setting i need to do?
I ran aspnet_regsql utility also.
Sr Software Engineer,
Pune , India