Asp.net Gridview Reorder Rows with Drag Drop Options using jQuery Tablednd Plugin

To implement drag and drop feature in gridview we need to write the code like as shown below <html > <head> <title>jQuery Drag and Drop Gridview Rows in Asp.net</title> <script type=”text/javascript” src=”http://code.jquery.com/jquery-1.8.2.js”></script> <script src=”jquery.tablednd.js” type=”text/javascript”></script> <script type=”text/javascript”> $(function() { $(“#gvDetails”).tableDnD(); }) </script> </head> <body> <form id=”form1″ runat=”server”> <div> <asp:GridView ID=”gvDetails” runat=”server”> <HeaderStyle BackColor=”#DC5807″ Font-Bold=”true” ForeColor=”White” […]

Read More

jQuery Send Receive JSON Objects from Web Service Methods using AJAX in ASP.Net

To send, receive JSON objects from web services methods using jQuery ajax methods in asp.net open your aspx page and write the following code. <html xmlns=”http://www.w3.org/1999/xhtml”> <head> <script type=”text/javascript” src=”http://code.jquery.com/jquery-1.8.2.js”></script> <script type=”text/javascript”> $(function () { $(‘#btnSend’).click(function () { var product = {Name : ‘Oneplus One’,Price : 22000} $.ajax({ type: “POST”, contentType: “application/json; charset=utf-8”, data: “{product:” […]

Read More

jQuery Cookie Create, Get (Read), Delete (Erase) with Example

Here I will show how to create, Get (read), delete (erase) Cookie jQuery with example. Create Cookie $.cookie(‘the_cookie’, ‘the_value’); Create expiring cookie 7 days from then: $.cookie(‘the_cookie’, ‘the_value’, { expires: 7 }); Create expiring cookie, valid across entire site: $.cookie(‘the_cookie’, ‘the_value’, { expires: 7, path: ‘/’ }); Read Cookie $.cookie(‘the_cookie’); // => “the_value” $.cookie(‘not_existing’); // => […]

Read More

Get Current Location using Google Map Geolocation API Service in asp.net

<html> <head> <title>Get User Current Location using Google Map Geolocation API Service in asp.net</title> <style type=”text/css”> html { height: 100%; } body { height: 100%; margin: 0; padding: 0; } #map_canvas { height: 100%; } </style> <script type=”text/javascript” src=”https://maps.googleapis.com/maps/api/js?key=AIzaSyC6v5-2uaq_wusHDktM9ILcqIrlPtnZgEk&sensor=false”> </script> <script type=”text/javascript” src=”http://maps.googleapis.com/maps/api/js?sensor=false&libraries=places”> </script> <script type=”text/javascript”> if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(success); } else { alert(“Geo Location […]

Read More

Use Strict in JavaScript

“Strict” is a new feature in ECMAScript 5 that allows you to place a program, or a function, in a “strict” operating context. It prevents, or throws errors, when relatively “unsafe” actions are taken (such as gaining access to the global object). It disables features that are confusing or poorly thought out.Currently, it is supported […]

Read More