Monday, June 2, 2014

Download Microsoft Filter Pack 2.0 64 bit

In order to install Sharepoint 2010 x64 it is necessary to install Microsoft Filter Pack 2.0

If you don't have Microsoft Filter Pack than You can download it from the following link

Download Microsoft Filter Pack 2.0 x64

The file is password protected, password is 'taqi' without quotes

Thanks

Create Regular Expression to accept only Alphabets

In this tutorial I will show you how to create a Regular Expression that will only contain Alphabets, I will also show how to edit the RE to accept other characters

The following regEx will only accept Alphabets

 re = /^[A-Za-z]+$/;

To Accept Alphabets + some other characters like /,.,, we can write regular expression like below

 re = /^[A-Za-z-/-,-.]+$/;



I hope it was informative for you and I would like to Thank you for reading.

Monday, April 21, 2014

Update label by using jQuery

In this tutorial I will shou you how to change label by using jQuery

we will use jQuery.text() method for this purpose

$("#lblShareError").text("Your new Text");

where lblShareError is the name of our label

I hope it was informative for you, and I would like to Thank You for reading

Clear Textbox text using jQuery

In this tutorial I will show you how you can clear textbox value in jQuery

                $("#<%=TextBoxName.ClientID %>").val("");

To do this is javascript we can use document.getElementById

 document.getElementById('txtFolderName").value = "";

if the control is inside master page and you want to access it  from content page than use the following syntax

document.getElementById('<%=Master.FindControl("txtFolderName").ClientID %>').value = "";


I hope it was informative for you and I would like to Thank you for reading

Sunday, April 20, 2014

Check String length jQuery Custom Validation

In this tutorial I will show you how you can validate string length i.e. maximum and minimum characters in jQuery

For this operation we will use ASP.NET Custom validator

First in our markup we need to create a Custom Validator

<asp:CustomValidator ID="CustomPasswordRangeValidator"
ClientValidationFunction="ClientValidate" ControlToValidate="Password" runat="server"></asp:CustomValidator>

Now we will define a method in javascript this function will contain all the validation

function ValidateUserName(source, clientside_arguments) {
            //Test whether the length of the value is more than 6 characters
            if (clientside_arguments.Value.length >= 4 && clientside_arguments.Value.length <= 10) {
                clientside_arguments.IsValid = true;
            }
            else {
                clientside_arguments.IsValid = false
                source.innerHTML = "UserName must be between 5 to 10 characters";
            };
 
this function check if the string length is greater than 4 and less than 10 than it will be allowed.
 
else we will set a custom error message
 
I hope it was informative for you and I would like to Thank you for reading