Posts

Showing posts from January, 2015

ASP.NET (Read a text file)

1) default.aspx <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" 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>Read a text file</title> </head> <body>     <form id="form1" runat="server">     <div>             <asp:Button ID="Button1" runat="server"             Text="Display content of the text file" />         <br />         <br />         <asp:Button ID="Button2" runat="server"             Text="Display...

Username and Password Validation

<html> <head> <title>Username and Password Validation</title> </head> <body bgcolor=#ff9999> <hr size=10 color=brown> <font style="font-family:'Lucida Calligraphy'; font-size: 42px; background-color: #CCFF66;"> <marquee behavior=alternate scrollamount=5>Welcome</marquee> </font> <hr size=10 color=brown> <h2> <br> <form name=test> <font face="Segoe Print"> Enter Username :-</font>&nbsp; <input type=text name=un style="height: 30px; width: 145px; font-size: 18px;"> <br><br> <font face="Segoe Print"> Enter Password :-</font>&nbsp;&nbsp; <input type=password name=pass style="width: 145px; height: 30px; font-size: 18px;"> </h2> <br> <p> &nbsp;&nbsp;&nbsp;&nbsp; <input type=button name=sub value="Submit" onClick=subform();     style="w...

ASP.NET (Votes Counting or Votes Cast)

 1) default.aspx <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" 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>Votes Counting or Votes Cast</title> </head> <body bgcolor="#ccff99" text="#993300">     <form id="form1" runat="server">     <div>             <h2>Who is the Best Teacher in Science Faculty?</h2><br />         <br />         <asp:RadioButton ID="RB1" runat="server" GroupName="R" Text="SURUNGALE SIR" />         <br />         <br...

ASP.NET (Client side and Server side information)

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" 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>Client side and server side information</title> </head> <body>     <h1>Client side information is</h1>     <form id="form1" runat="server">     <div>     <script language =javascript >     var dt,d ,m,y,hr,min,sec,wk,mn,dy     dt=new Date     d=dt.getDate ()     m=dt.getMonth ()+1     y=dt.getFullYear ()     dy=dt.getDay()     document .write ("Current date is "+d+"/"+m+"/"+y+"<br>")     hr=dt.getHours...

ASP.net code to display a report of client IP address,browser information etc.

<html> <head> <title>ASP.net code to display a report of client IP address,browser information etc.</title> </head> <body> <p> <b>You are browsing this site with </b> < % response.write (request.servervariables("http_user_agent")) % > </p> <p> <b>IP address is </b> < % response.write (request.servervariables("remote_addr")) % > </p> <p> <b>The DNS lookup of IP address is </b> < % response.write (request.servervariables("remote_host")) % > </p> <p> <b>The method used to call the page is </b> < % response.write (request.servervariables("request_method")) % > </p> <p> <b>The server's code number is </b> < % response.write (request.servervariables("server_port")) % > </p> <p> <b>Server's domain name is </b> < % response.write (r...

ASP.NET (Calculate Birhdate)

1) default.aspx <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" 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>Calculate birthdate</title> </head> <body>     <form id="form1" runat="server">     <p>         Enter Your Name&nbsp;&nbsp;&nbsp;&nbsp;         <asp:TextBox ID="txt1" runat="server"></asp:TextBox>     </p>     <div>             Enter Your birthdate         <asp:TextBox ID="txt2" runat="server"></asp:TextBox>       ...

Fiboncci series

<html> <head> <title>Fiboncci series </title> </head> <body bgcolor=brown text=yellow> <h2 align=center> <script language=javascript>     var no1,no2,no3,i     no1=0     no2=1     document.write(no1)     document.write("<br>")     document.write(no2)     document.write("<br>")     i=3 while (i<=20) {     no3=no1+no2     document.write(no3)     no1=no2     no2=no3     i++     document.write("<br>") } </script> </h2> </body> </html>

Series

<html> <head> <title>Series</title> </head> <body bgcolor=black text=white> <script language=javascript>     var i,j document.write("<table border=5 width=1350 height=650>")     for(i=1;i<=10;i++) {     document.write("<tr>")     for(j=1;j<=30;j++)     {     document.write("<th>")     document.write(i*j)     document.write("</th>")     }     document.write("</tr>") } document.write("</table>") </script> </body> </html>

Prime Number

<html> <head> <title>Prime Number</title> </head> <body> <script language=javascript>     var no,i,r,cnt     cnt=0     no=parseInt(prompt("Enter a Number"))     for(i=2;i<=no-1;i++)     {     r=no%i     if(r==0)     {     cnt++     }     }     if(cnt>0)     {     alert("It is not a Prime Number")     }     else     {     alert("It is a Prime Number")     } </script> </body> </html>