We normally face a task like to show Menu when we right click the gridview or treeview e.t.c. Many third party controls are providing this right click context Menu to the controls like one of the best third party control like Telerik . But we can do this type of requirements using jQuery also. To do this in ASP.NET we need to download the jQuery Context Menu plugin. We need frame the menu div based on our requirement.See this example to do < div > < ul id ="myMenu" class ="contextMenu" > < li class ="edit" >< a href ="#edit" > Edit Node </ a > </ li > < li class ="delete" >< a href ="#delete" > Delete Node </ a > </ li > </ ul > </ div > * This source code was highlighted with Source Code Highlighter . After downloading the plugin you need to add this l...
Normally we get this type of requirement to accept only numbers in a text box.Suppose we have a Credit Card Number entry where we want to validate the key-press is number or not.Here i have simplified the way to enter only numbers in the text-box. Here i have written some logic to enter only numbers in textbox using javascript. < script type = " text/javascript " > function isNumberKey ( evt ) { var charCode = ( evt . which ) ? evt . which : event . keyCode if ( charCode > 31 && ( charCode < 48 || charCode > 57 ) ) return false ; return true ; } < script > Now we can call this fu nction in the events like keypress,keydown and keyup to validate the value is number or not. Happy Coding :-)
Normally when we do the addition and deletion of record in the ADODB,cursor type and lock type will be changed.So we need to be very careful while adding and deleting a record using the record set object.So for this I have done a sample on addition only. 1. When we want to add using the record set object we need to pass the Cursor Type and Lock Type as ADODB.CursorTypeEnum.adOpenDynamic ADODB.LockTypeEnum.adLockOptimistic 2. By default, ADO record sets are opened with a lock type of adLockReadOnly, which does not allow additions and deletions. 3. To allow additions and deletions, open the record set with a lock type of either adLockOptimistic or adLockPessimistic To Solve this we need change the code like this Dim recordSetObj As New ADODB . RecordSet recordSetObj . Open ( "select * from students" , "Your Connection Object" , ADODB . CursorTypeEnum . adOpenDynamic , ADODB . LockTypeEnum . adLockOptimistic ) If Not reco...
Comments
Post a Comment