Tuesday, January 13, 2004

New and Notable .NET Sites

A new .NET site and from what I can see has some great promise. Definately worth checking out.

http://www.theserverside.net/news/index.aspx


10:59:57 PM    
comment [] trackback []

Toggle the Toolbar

Within a trusted InfoPath form you have the ability to toggle on and off the menu bar using the following code as an example:

 

//Get a reference to the CommandBars collection. The CommandBars collection is

//defined in the Microsoft Office 11.0 Object Library

var objCommandBars = XDocument.View.Window.CommandBars;

 

//If the menu bar is disabled, enable it

if (objCommandBars(1).enabled==false)

objCommandBars(1).enabled=true;

//If the menu bar is enabled, disable it

else

objCommandBars(1).enabled=false;

 

One note – if you turn off the menu bars they are off. This mans unless you turn them on, the next time you come back into InfoPath you will see no menus! BE CAREFUL! How did I learn this little trick you ask? Well, let’s leave it as – the hard way!


10:19:01 PM    
comment [] trackback []

Showing ASP.NET errors with WSS

Windows Sharepoint Services (WSS) is a fantastic product that is part of the Windows Server 2003 operating system. WSS is actually written using ASP.NET and leverages many different aspects of the .NET Framework. By default, WSS provides its own error messages that most of the time provides enough information and data needed to troubleshoot errors. I recently ran across a problem today that I just couldn’t figure out. To solve the problem I needed to see the ASP.NET error that was occurring. Actually, this is pretty easy to do. Here are the steps:

 

1.      In the Local_Drive:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions60TEMPLATELAYOUTS folder, change the name of the global.asax file to global.bak.

 

2.      In the web.config file in the same folder, change customErrors = "On" to customErrors="Off".


9:12:54 PM    
comment [] trackback []