Skip to main content

Posts

How to limit the character entry into a text box in jQuery?

Hi All,         I had come across a situation where i need to limit the character count into a text box. Suppose, your there is a requirement where the text box should take only 20 characters. In this situation preferably use the keypress method for even to happen as follows $( '#IdOfTheTextBox’ ).keypress( function (e) {               if (e.which < 0x20) { //This snippet you have to use , otherwise it will not allow you perform action using  backspace or delete button on FireFox                      return ;               }               if ( this .value.length == "20" ) {                 ...

What is "/g" in Regular expression?

Being a techno geek i was searching an answer , what is the use of "/g" in regular expression.Usually while writing regular expression we add /g at the end of the regular expression . for example, there is a regular expression     /[^a-zA-Z0-9 ]/ g .The answer is simple:  The g on the end after the  / means do a global replace - if you leave it off then only the first match will be replaced. Cheers Pradeepa achar

Add data to GridView and Export GridView data to Excel sheet

Suppose , you have data stored in a array of structure. let us say,    public struct myData    {       string name;       int age;       string city;      public myData(string pName,int pAge,string pCity)         {           name=pName;           age=pAge;           city=pCity;         }     } ............... public void dataTableData() {        List<myData> items=new List<myData>();        ...add name,age,city of each person to the object 'data'.    //Now you need to add data present in the object 'items' to the GridView DataTable table=new DataTable(); DataRow row=null; //Create three columns 'Name','Age','City' table.Columns.Add(new DataColumn("Name",typeOf(string)); table.Columns.Add(new...

I have began to Explore REST Services...

Now i am very much keen to know about REST services.!!!!! What is this REST services? Whilre retreiving data from server, most of the time our mind goes to Webservice. There is some thing beyod the webservice, by using which we can retrieve data in strongest way.That is through "REST". I have got an video link on  Youtube , by following the instruction you can explore ,how to use REST services... I am going to post certain thing about REST services shortly..:)..

The Fastest way to Export Schema of Sharepoint List

Many of my SharePoint Developer friends are struggling to get the Schema.xml file of a newly created list. The schema.xml file has the list's metadata information, by using the schema.xml, we can create the lis definition and paste this contents of Schema.xml to the Schema.xml file of the newly created List definition, so that you can deploy the list definition on another site. In order to do this, you guys might be following the procedure bu saving the site template and get the site definition solution. After this, you will open visual studio and import this solution and wait for few minutes. THIS IS A CRAPPY PROCEDURE..Why do you invest your time to get a schema of one or few list  by taking entire site definition?..If that site has lots of lists, then it will take lots of time. In my Research, i have found a the BEST  and quicker way to get schema.xml file of a particular list which you need Schema.xml. Follow the following procedure : Go to your site  click ...