Pages

Tuesday, April 30, 2013

Hide left navigation panel without using Sharepoint designer


The users ask to remove left navigation in the Sharepoint Master pages.
You hust hide the left navigation using the below code with Content Editor
webpart








Since this web part is just added to the home page, it doesn’t hide the
left nav penal for other pages.

Once move the code in the CEWP then set the chrome type to be “None”.
 

Tuesday, April 2, 2013

Sharepoint Caluclation column

1.Display date format like "dd-MMM-yyyy"

=TEXT(StartDate,"dd-mmm-yyyy")

Namespaces for .Net Fucntionality

1. Going to use upload functionality the use the namespace

using System.IO;

if (!System.IO.File.Exists(fileToUpload))
                throw new FileNotFoundException("File not found.", fileToUpload);

Otherwise it throws error
----------------------------------------------------------------------------------------------------------------

ASP.Net Validation Controls

1. Validation for Non-Numeric and Decimal Values

It will restrict alphabets characters. It will allow only Numbers or
decimal values.

style="text-align:right" Width="53px" BackColor="#82CAFA"
BorderStyle="Dotted" BorderWidth="1px">

                                                   
runat="server" ErrorMessage="Only Number allowed"
ControlToValidate="Target"  ValidationExpression="^\d*[0-9](|.\d*[0-9]|,
\d*[0-9])?$" ValidationGroup="METVAL">

----------------------------------------------------------------------------------------------------------------