Wednesday, May 18, 2011

Print Web Page

 //Copy and Paste this into <body> section
<SCRIPT Language="Javascript">

This script is written by Eric (
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit

function printit(){ 
if (window.print) {
    window.print() ; 
} else {
    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = ""; 

<SCRIPT Language="Javascript"> 
var NS = (navigator.appName == "Netscape");
var VERSION = parseInt(navigator.appVersion);
if (VERSION > 3) {
    document.write('<form><input type=button value="Print this Page" name="Print" onClick="printit()"></form>');       

Disable Right Click on Web Page

 //insert this script into <BODY> tag or<asp:contentPlaceHolder> tag

<script language=JavaScript>

//Disable right click script III- By Renigade (
//For full source code, visit

var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)

document.oncontextmenu=new Function("return false")
// -->

Monday, May 16, 2011

VB.NET Image SlideShow

 //For 3 images
<head runat="server">
<script type="text/javascript">
var image1=new Image()
var image2=new Image()
var image3=new Image()
 //default image
<img alt="" src="~images/class/DSC_0223G.jpg" name="slide" width="333" height="140"/>      
<script type="text/javascript" >
var step=1
function slideit(){
if (!document.images)
if (step<3)
setTimeout("slideit()",2000)     //for 2 seconds

Sunday, May 15, 2011

Auto Redirect from HTML page to ASPX page in 3 seconds

<meta http-equiv="refresh" content="3; URL=">

Monday, May 9, 2011

VB.NET Vertical Marquee

 //go to source from design then paste this in<td> tag
 <marquee direction="up" onmouseover=this.stop() onmouseout=this.start() scrollDelay="100">
kapiil chaudhary