<%# string.Format("{0}", Request.QueryString["value"])%>
This was all about Scenario's which I involved in my profession.
Friday, 12 September 2014
Disable right click option using jquery
$(function(){
$(this).bind("contextmenu", function(e){
e.preventDefault();
alert("right click is disabled"); //not recommended to give alert message
});
});
$(this).bind("contextmenu", function(e){
e.preventDefault();
alert("right click is disabled"); //not recommended to give alert message
});
});
Thursday, 5 June 2014
Very use ful for image map coordinates
for example, you can get full view of each mandal details using the coordinates
http://www.mapsofindia.com/maps/andhrapradesh/districts/prakasam-district-map.jpg
http://www.maschek.hu/imagemap/imgmap
http://www.mapsofindia.com/maps/andhrapradesh/districts/prakasam-district-map.jpg
http://www.maschek.hu/imagemap/imgmap
Sunday, 6 April 2014
call function or do something after ' x ' times in jquery
//--- call function after 10 seconds.
setTimeout("here specify what you want to do", 10000);
Wednesday, 2 April 2014
Reading session value from jquery using WebHandler
using System;
using System.Web;
using System.Web.SessionState;
using System.Web.Script.Serialization;
public class ReadSession : IHttpHandler,IReadOnlySessionState
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "application/json";
context.Response.Write(new JavaScriptSerializer().Serialize(new
{
Key = context.Request["key"],
Value = (context.Session[context.Request["key"]]!=null && context.Session[context.Request["key"]]!="" ? context.Session[context.Request["key"]]:"")
}));
}
public bool IsReusable
{
get { return true; }
}
}
/*-------( In jquery just call like this )--------*/
$.getJSON('/ReadSession.ashx', { key: key }, function (result) {
alert(result.Value);
});
using System.Web;
using System.Web.SessionState;
using System.Web.Script.Serialization;
public class ReadSession : IHttpHandler,IReadOnlySessionState
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "application/json";
context.Response.Write(new JavaScriptSerializer().Serialize(new
{
Key = context.Request["key"],
Value = (context.Session[context.Request["key"]]!=null && context.Session[context.Request["key"]]!="" ? context.Session[context.Request["key"]]:"")
}));
}
public bool IsReusable
{
get { return true; }
}
}
/*-------( In jquery just call like this )--------*/
$.getJSON('/ReadSession.ashx', { key: key }, function (result) {
alert(result.Value);
});
Tuesday, 25 March 2014
Confirm message box in jquery
if (confirm("Do you want to delete this record!")) {alert('you clicked on OK button')}
else{alert('you clicked on CANCEL button')}
else{alert('you clicked on CANCEL button')}
Monday, 10 March 2014
create cookies using javascript
/*-----( CREATING COOKIE )------*/
var email =$('#txtUserName').val();
var pwd = $('#txtPassword').val();
var d = new Date();
d.setTime(d.getTime()+(30*24*60*60*1000));
var v_rememberMe = $('#RememberMe').is(':checked') == true ? "Y":"N";
$('#RememberMe').is(':checked') == true ? (document.cookie = "email=" + email + ";expires=" + d.toGMTString() + "") : d.setTime(d.getTime() + (-31 * 24 * 60 * 60 * 1000)); document.cookie = "email=" + email + ";expires=" + d.toGMTString() + "";
/*-------( GETTING COOKIE VALUES )--------*/
$(document).ready(function () {
var mail = getCookie("email");
var expdays = getCookie("expires");
// mail!= "" ? ($('#txtPassword').focus(); $('#txtUserName').val(mail)): $('#txtUserName').focus();
if (mail != "") {
$('#txtPassword').focus(); $('#txtUserName').val(mail); $('#RememberMe').attr('checked', true);
}
else { $('#txtUserName').focus(); }
});
/*----( Getting cookie by Name )----*/
function getCookie(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i].trim();
if (c.indexOf(name) == 0) return c.substring(name.length, c.length);
}
return "";
}
var email =$('#txtUserName').val();
var pwd = $('#txtPassword').val();
var d = new Date();
d.setTime(d.getTime()+(30*24*60*60*1000));
var v_rememberMe = $('#RememberMe').is(':checked') == true ? "Y":"N";
$('#RememberMe').is(':checked') == true ? (document.cookie = "email=" + email + ";expires=" + d.toGMTString() + "") : d.setTime(d.getTime() + (-31 * 24 * 60 * 60 * 1000)); document.cookie = "email=" + email + ";expires=" + d.toGMTString() + "";
/*-------( GETTING COOKIE VALUES )--------*/
$(document).ready(function () {
var mail = getCookie("email");
var expdays = getCookie("expires");
// mail!= "" ? ($('#txtPassword').focus(); $('#txtUserName').val(mail)): $('#txtUserName').focus();
if (mail != "") {
$('#txtPassword').focus(); $('#txtUserName').val(mail); $('#RememberMe').attr('checked', true);
}
else { $('#txtUserName').focus(); }
});
/*----( Getting cookie by Name )----*/
function getCookie(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i].trim();
if (c.indexOf(name) == 0) return c.substring(name.length, c.length);
}
return "";
}
Subscribe to:
Posts (Atom)
Extracting Nupkg files using command line
Rename it to zip first then extract files as below 1. Rename-Item -Path A_Package.nupkg -NewName A_Package.zip 2. Make sure to repla...
-
In this exercise we will create a new feature module in our solution. Modules are a conceptual grouping of all assets related to a sin...
-
Adding something to the first item in a loop. As an example, below adding the active class to a bootstrap element, useful for tabs, menus...
-
Getting-started Bootstrap Components Grid Positioning