By Stephen Chapman Web novices often believe that by blocking their visitors use of the right mouse button that they can prevent the theft of their web page content. Nothing could be further from the truth as there are so many ways to bypass the “no right click script” that the only effects that such […]
Archive for the 'Classic ASP' Category
ASP.NET Login Page with SQL Backend
Let’s start simple by creating form controls: <table> <tr><td>Usernname</td><td><asp:TextBox ID=”user” runat=”server”></asp:TextBox></td></tr> <tr><td>Password</td><td><asp:TextBox ID=”password” runat=”server” TextMode=”Password”></asp:TextBox></td></tr> <tr><td></td><td><asp:Button ID=”Button1″ OnClick=”submit” Text=”Login” runat=”server” causesValidation=”true” /></td></tr> </table> Now add some form validation: <table> <tr><td>Usernname</td><td><asp:TextBox ID=”user” runat=”server”></asp:TextBox> <asp:RequiredFieldValidator ID=”RequiredFieldValidator1″ runat=”server” ControlToValidate=”user” ValidationGroup=”UserCheck” ErrorMessage=” <font color=’red’> « Username is required!</font> “> </asp:RequiredFieldValidator> </td></tr> <tr><td>Password</td><td><asp:TextBox ID=”password” runat=”server” TextMode=”Password”></asp:TextBox> <asp:RequiredFieldValidator ID=”RequiredFieldValidator2″ runat=”server” ControlToValidate=”password” […]
Classic ASP – Date and time formating
Code <script type=”text/vbscript”> document.write(DateAdd(“yyyy”,1,”31-Jan-10″) & “”) document.write(DateAdd(“q”,1,”31-Jan-10″) & “”) document.write(DateAdd(“m”,1,”31-Jan-10″) & “”) document.write(DateAdd(“y”,1,”31-Jan-10″) & “”) document.write(DateAdd(“d”,1,”31-Jan-10″) & “”) document.write(DateAdd(“w”,1,”31-Jan-10″) & “”) document.write(DateAdd(“ww”,1,”31-Jan-10″) & “”) document.write(DateAdd(“h”,1,”31-Jan-10 08:50:00″) & “”) document.write(DateAdd(“n”,1,”31-Jan-10 08:50:00″) & “”) document.write(DateAdd(“s”,1,”31-Jan-10 08:50:00″) & “”) </script> Output 1/31/2011 4/30/2010 2/28/2010 2/1/2010 2/1/2010 2/1/2010 2/7/2010 1/31/2010 9:50:00 AM 1/31/2010 8:51:00 AM 1/31/2010 8:50:01 AM