Monthly Archives: July 2007

Important Tech Links

About Delegates: ASP.NET Page Modules ASP.NET Question Answer  AutoSuggestControl Print From ASPX Page dotnetcaffe DHTML Methods .NET Development & Architecture MSN .NET questions answers Interop in .NET Framework ebooks .NET Blog Visual Studio .NET Code Editing Tips & Tricks .NET Blog […]

Disable rightclick with javascript,js,,disable_rc.aspx <html><head><script language = "javascript">function Disable() {if (event.button == 2) {alert("This action is not possible")}}document.onmousedown=Disable;</script></head><body></body></html> 

Required field Validation on dropdown Selected index changed

——————————————————– If a field Validation needed then write——–ValidatorEnable(document.getElementById("reqDefaultDisplay"),true);else write——-ValidatorEnable(document.getElementById("reqDefaultDisplay"),false); 

Custom Vaidation for UserName

1.Java script:<script type="text/javascript">       function ClientValidate(source, arguments)       {          var userName = eval(‘window.document.form1.txtUserName.value’);    if(userName.length<5||userName.length>10)    {      arguments.IsValid = false;    }          else          {            arguments.IsValid = true;          }       }     </script> 2.ASPx:<asp:TextBox ID="txtUserName" runat="server"></asp:TextBox> <asp:CustomValidator id="CustomValidator1" runat="server"ControlToValidate="txtUserName"ClientValidationFunction="ClientValidate"Display="Static"Font-Names="verdana" Font-Size="10pt">Length of UserName must be in 5-10.</asp:CustomValidator> <asp:Button ID="Button2" runat="server" Text="Submit" /> 

Convert Password if password field is varbinary

select convert(varchar,[password]) as password,* from tblHM_UserMaster 

IN Page popup Links

Like baloon Like Rectangle 

Random ID selection using sql server

SELECT TOP 1 dykid,dyktext FROM dyktable where dykstatus=’y’ ORDER BY NEWID()