Monday, March 18, 2013

Visual Studio 2010 Serial Key

visual studio 2010 serial key - visual studio 2010 product key



YCFHQ9DWCYDKV88T2TMHG7BHP

Saturday, June 2, 2012

Objects in Asp


Objects in Asp
Today we are going to discuss about what is objects in asp.and types of
    objects in asp is an instance of class
The list of objects in asp are


Response    : - The  Response object in asp is used to send output to the user from the server.
Request      :- The Request object in asp is used to get information from a visitor.
Application : - The Application object in asp is used to tie these files together.
session       :- The session objects in asp stores information about users
Server       : - its is used to get methods and properties of server


Thursday, May 10, 2012

server side date validation Asp


There may be situation when u need to do Server Side Date Validation

Asp server side validation
Data needs to be validate at server side because client side can be stop by disabling javascript.
server side validation is validation which get executed when page is posted
on server. But it is good practice to use both server side and client side
valition in Application.
Below example shows how to do Server Side Date Validation

1) Copy the below code in text file and save it as ServersideDatevalidation.asp

<%
Function ValidDate(DateFormat)
Set re = New RegExp
re.Pattern = "^(([0-9])|([0-2][0-9])|([3][0-1]))[-](([0-9])|([0-0][0-9])|([0-1][0-2]))[-]\d{4}quot;
If not re.Test(DateFormat) Then
ErrorMsg="Invalid Date"
End If
ValidDate=ErrorMsg
End Function

Function CompareDate(FromDate1,ToDate1)
Dim arrfr,arrto
arrfr = split(FromDate1,"-")
FromDate1=arrfr(1)&"/"&arrfr(0)&"/"&arrfr(2)
arrto=split(ToDate1,"-")
ToDate1=arrto(1)&"/"&arrto(0)&"/"&arrto(2)
FromDate1=cDATE(FromDate1)
ToDate1 =cDATE(ToDate1)
if ToDate1 <> "" and FromDate1 <> "" then
if datediff("d",date(),FromDate1) > 0 then
ErrorMsg="From date should not be future date"
elseif datediff("d",date(),ToDate1) > 0 then
ErrorMsg="To date should not be future date"
elseif datediff("d",ToDate1,FromDate1) > 0 then
ErrorMsg="From date should not be greater than To date"
end if
else
ErrorMsg= "To Date and/or From date should not be blank"
end if
CompareDate=ErrorMsg
End Function
%>

2) now u can include the above file and use it the below mention manner..
<%
if Request.ServerVariables("HTTP_METHOD") = "POST" THEN
StrErrDis = ""
StrErrDis= ValidDate(Request.Form("txtfromopen"))
StrErrDis = StrErrDis & ValidDate(Request.Form("txttoopen"))

if StrErrDis = "" then
StrErrDis=CompareDate(Request.Form("txtfromopen"),Request.Form("txttoopen"))
end if

If StrErrDis <> "" Then
txtErr_message = StrErrDis
Response.Write StrErrDis
Response.End
End If

END IF
%>
GooglePlus

Thursday, November 11, 2010

How to insert a hyperlink in Outlook Web Access

How to insert a hyperlink in Outlook Web Access
Select the text for which you want to create a hyperlink and use the CTRL+ L keyboard short-cut key to bring up the hyperlink dialog box which lets you insert or change a hyperlink in the text.

Monday, January 18, 2010

How to Create Draggable Div

JavaScript can be used to create draggable item or Div on web page. How to create draggable div / Layer in javascript.

<style>
<!--
.dragmeit{position:relative;}
-->
</style>
<script language="JavaScript1.2">
<!--

var ie = document.all;
var nn6 = document.getElementById&&!document.all;

var isdraggingnow = false;
var x,y;
var myobj;

function movemousenow(e)
{
if (isdraggingnow)
{
myobj.style.left = nn6 ? tx + e.clientX - x : tx + event.clientX - x;
myobj.style.top = nn6 ? ty + e.clientY - y : ty + event.clientY - y;
return false;
}
}

function selectmousenow(e)
{
var firstobj = nn6 ? e.target : event.srcElement;
var topelement = nn6 ? "HTML" : "BODY";

while (firstobj.tagName != topelement && firstobj.className != "dragmeit")
{
firstobj = nn6 ? firstobj.parentNode : firstobj.parentElement;
}

if (firstobj.className=="dragmeit")
{
isdraggingnow = true;
myobj = firstobj;
tx = parseInt(myobj.style.left+0);
ty = parseInt(myobj.style.top+0);
x = nn6 ? e.clientX : event.clientX;
y = nn6 ? e.clientY : event.clientY;
document.onmousemove=movemousenow;
return false;
}
}

document.onmousedown=selectmousenow;
document.onmouseup=new Function("isdraggingnow=false");

function hideDivs()
{
var arr = document.getElementsByTagName('div')
for(var i=0; i<arr.length;i++)
{
arr[i].style.display = (arr[i].style.display == 'block')? 'none':'block';
}
}

//-->
</script>

<a href="#" onclick="hideDivs();return false;"><font face="arial" size="2" ><b>Hide/Show</b></font></a>

<div >
<img src="yourimage.gif" class="dragmeit">

</div>