Thursday, January 27, 2011

How to Hide InfoPath Control Programmatically c#

To hide the InfoPath control we can simply create a variable and format the control accordingly.



If you want to hide the control programmatically, set the variable value. then InfoPath will render the control accordingly.

XPathNodeIterator NodeIterator = nav.Select("/my:myFields/my:MainSection/my:BidDocument", NamespaceManager);


Above code will display the control.

Following code will hide the control

nav.SelectSingleNode("/my:myFields/my:isPicVisible", NamespaceManager).SetValue("False");

Sunday, January 2, 2011

Download starter.master for SharePoint 2010


This is having all most all the controls hidden.

This is having some important controllers. Not all hidden.


Enable Full Errors in SharePoint 2010

Normally SharePoint shows the custom errors to the users. which is not very relevant in the development environment. thus you can enable the full errors by

  • Go the SharePoint web application using IIS  
  • Open the Web.config
  • Find CallStack word.

<SafeMode MaxControls=”200” CallStack=”false” DirectFileDependencies=”10”
    TotalFileDependencies=”50” AllowPageLevelTrace=”false”>

Change both the CallStack and AllowPageLevelTrace attributes from false to true.

  • then find customErrors and make it to false.

<customErrors mode=”On” /> –> Make this to “RemoteOnly”.