Home » 2011 (Page 10)

Archive for 2011

Form Validation

Regular Expression Validator – Date Validation TextBox Control <asp:TextBox ID=”REF_PAID_DATETextBox” runat=”server”  Text='<%# Bind(“REF_PAID_DATE”) %>’ ToolTip=”Use MM/DD/YYYY format”  class=”myTextBox75″ ></asp:TextBox> Regular Expression Validator <asp:RegularExpressionValidator ID=”REF_PAID_DATEFormat” runat=”server” ValidationExpression=”^\d{1,2}/\d{1,2}/\d\d\d\d$” ControlToValidate=”REF_PAID_DATETextBox” ValidationGroup=”Form1″ Text=” <font color=’red’> mm/dd/yyyy </font>” ErrorMessage=”<font color=’red’> mm/dd/yyyy </font>”> </asp:RegularExpressionValidator> Submit Button <asp:Button ID=”UpdateButton” runat=”server” CausesValidation=”True” ValidationGroup=”Form1″ CommandName=”Update” Text=”Update” />

.NET Form/GridView Update Command Property

Insert this code right below <!DOCTYPE html PUBLIC “…..”> tag: Sub UpdateMessage(ByVal source As Object, ByVal e As SqlDataSourceStatusEventArgs) If e.AffectedRows > 0 Then ‘ Perform any additional processing, ‘ such as setting a status label after the operation. Label1.Text = “- Information updated successfully!” Else Label1.Text = “No data updated!” End If End Sub […]

Block Access To Page Context Menu

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 […]