Sunday, January 29, 2012

Html using javascript with arrays

<html>
<head>
<title>Wishes</title>
<script language="JavaScript">
 var a=[25,37,12,3,16,8];
 var i,j;
 document.writeln("<table border='5'>");
 document.writeln("<tr>");
 document.writeln("<th>"+"
Position"+"</th>");
 document.writeln("<th>"+"
Feadf"+"</th>");
 document.writeln("<th>"+"
Length"+"</th>");
 document.writeln("</tr>");
 for(i=0;i<=a.length;i++)
 {
  document.writeln("<tr>");
  document.writeln("<td>" + i + "</td>");
 
  document.writeln("<td>");
  document.writeln(a[i]);
  document.writeln("</td>");
  document.writeln("<td>");
  for(j=1;j<=a[i];j++)
  {
   document.writeln("*");
  }
  document.writeln("</td>");
  document.writeln("</tr>");
}
document.writeln("</tr>");
document.writeln("</table>");
</script>
</head>
<body>
</body>
</html>

RegularExpression Validations in asp.net



for date validations:
<asp:RegularExpressionValidator
               ID="Regular" runat="server" ErrorMessage="Invalid date(yyyy/mm/dd)" ControlToValidate="dpRequestDate" Display="Dynamic" ValidationExpression="^((\d{2}(([02468][048])|([13579][26]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|([1-2][0-9])))))|(\d{2}(([02468][1235679])|([13579][01345789]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\s(((0?[1-9])|(1[0-9])|(2[0-3]))\:([0-5][0-9])((\s)|(\:([0-5][0-9])))?))?$"></asp:RegularExpressionValidator>
                
 
It is for E-mail format(validation expression) :  \w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* 

and it is for characters not no.s :
1       ^\d{3}\-\d{2}\-\d{4}$ ;  

2    ^[a-z]*$

Telugu language in asp.net Textbox


<input attachmode="optout" id="MicrosoftILITWebEmbedInfo" type="hidden" value="" />
<script defer="defer" src="http://ilit.microsoft.com/bookmarklet/script/Telugu.js" type="text/javascript">
</script>

this code for telugu language (in textbox) in asp.net
Protected by Copyscape Plagiarism Software