Posts

Get the Current Row Index on RowCommand event in Gridview Data Control

GridViewRow row = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer); int strCurrentRowIndex = row.RowIndex; GridViewRow selectedRow = grdDetail.Rows[strCurrentRowIndex]; string clientname = selectedRow.Cells[0].Text;

JQuery Smooth Pop Up Window

<html xmlns="http://www.w3.org/1999/xhtml"> <head>     <title>JQuery Pop up</title>     <script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script>     <script type="text/javascript" language="javascript">         $(document).ready(function() {             //select all the a tag with name equal to modal             $('a[name=modal]').click(function(e) {                 //Cancel the link behavior                 e.preventDefault();                 //Get the A tag        ...

Add Month to a date in javascript

function getNextScheduledDate() {             var date = document.getElementById('<%= txtDate.ClientID %>');             var arry = new Array();             arry[1] = document.getElementById('<%=txtDate.ClientID %>').value;             var ArrDoj = arry[1].split("/");             var myDate = new Date(ArrDoj[2], ArrDoj[1], ArrDoj[0]);             //get month and add three month             myDate.setMonth(myDate.getMonth() + 3);             //get date             var strday = myDate.getDa...

Check Integer and Double Value in Javascript

function checkDouble(evt, strValue) {     var iKeyCode = (evt.which) ? evt.which : event.keyCode;     //if( iKeyCode <= 46 || iKeyCode > 58 || iKeyCode==47)     if (iKeyCode <= 46 || iKeyCode > 57 || iKeyCode == 47) {         // handle "." case         if (iKeyCode == 46) {             var is_dot = strValue.indexOf('.');             if (is_dot == -1) {                 return true;             }             else {                 iKeyCode = 0;          ...