Tuesday, May 21, 2013

How to Disable Back Button for Web Page? - Handling Logout Issue

Introduction

I am facing issue in my application's logout scenario. After the user login into website and then do logout, which leads back to login page. But the problem is now, from this login page, If I click the browser back button then It again takes the user back to the previous visited page as if logged in.

 

How can I stop user from viewing the previous page logged out?

 

disable back button, java script in browser,logout,logout button,issue, an example

Actually the back button works by stepping through the history of HTTP requests which is maintained by the browser itself. This history is stored in browsers cache that consists of the entire page content with resources like image and scripts. 

This enables browser to navigate backwards and forwards through the browser history and have each page displayed instantly from cache without the delay of having it retransmitted over the internet from the server.

Here are following ways to handle such scenario:-

How to Block Refresh Key (F5) in JavaScript? - Source Code

Introduction

In this post I will show how to block refresh key (F5) for a web page. It works on IE8, IE9, Mozilla14, Chrome26 browser as well. Find the source code below:-

Default.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>How to Block Refresh Key (F5) in JavaScript?</title>

How to Open a Lightbox Div OnClick with Browser Compatibility? - CSS

Introduction

A Light box is an effect that fades the page in the background to show you new content in the foreground. In this post I will explain how to open a light box div with browser compatibility onClick event.

There are lots of lightbox code available over the internet with animations. Most of them required heavy use of java script and some may required additional framework or third party tool. But here I am sharing an easy example for the same, find the source code below:-

show div,lightbox,css,onclick,div,in the lightbox,Browser compatible,ui,application design

Monday, May 20, 2013

Why use jQuery over Ajax Control Toolkit? - UI jQuery

Introduction:

Now a days we use jQuery more often compare to Ajax control toolkit. Here I will explain why we use jQuery over Ajax Toolkit, some of the key reasons are following:-

  • jQuery is Open Source
  • jQuery is light weight, means its smaller in size and don't increase page size when load, hence page will load faster compare to page which are using asp.net ajax controls.
  • jQuery script file is cache-able,  most of the modern browser do cache of script, Css and image files, which means JQuery script file is downloaded only ones when page is loaded for the first time, all subsequent calls to page using JQuery doesn't need to download it again and again.
  • jQuery can run on any Html page, while Ajax control toolkit runs on asp.net web page.
  • jQuery is not only used for Ajax, jQuery can be used for giving effects to your website like css changing or pop-up flashing and much more effects, which is not easily available with ajax controls.

Sunday, May 19, 2013

How to Enable Visual Refresh a New Look on Map? - Google Maps Update


Here in this post I will explain about to enable visual refresh concept. The Google Maps visual refresh brings a fresh new look to applications using the Google Maps JavaScript API. You can change it using a single line of code.

Enabling the visual refresh

To enable visual refresh mode, set the google.maps.visualRefresh global property to true.

concept, google maps update, visual refresh,add a place marker without shadow, new base map tiles,default markers and window style,

Friday, May 17, 2013

How to Show Google Map Multiple Markers Info Window in Java Script - API Google Maps v3

Introduction:In my previous post I explained How can I add a place in Google Map. Here in this article I will explain how to add multiple markers with info window in asp.net web application. Find the source code below:-

how to display,infowindow, multiple markers,api v3 google maps, Java Script,Aspnet, an Example


Default.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>

Naming Convention for Database Design - SQL Server

Introduction
In this post I will explain naming convention for database table, field, procedure, function, primary key, constraint, Index. When doing database design you should keep the following convention or standards in your mind :-