Validate one of the two textbox values Markup page Please enter on of at least one contact point: <asp:CustomValidator ID=”ContactInfoAlert” runat=”server” ErrorMessage=”CustomValidator” OnServerValidate=”CustomValidator_ServerValidate”> </asp:CustomValidator> User email: <asp:TextBox ID=”EmailTbx” runat=”server” ToolTip=”Enter email.” > </asp:TextBox> User phone: <asp:TextBox ID=”PhoneTbx” runat=”server” ToolTip=”Enter phone number.” > </asp:TextBox> <asp:Button ID=”Btn1″ runat=”server” Text=”Next” CausesValidation=”true”/> Click to read more… Code-behind page Protected […]
Archive for the 'Validation Controls' Category
Delete confirm message – VB.NET
Delete confirm message when deleting record in GridView <asp:TemplateField> <ItemTemplate> <asp:LinkButton ID=”LinkButton1″ Runat=”server” OnClientClick=”return confirm(‘Are you sure you want to delete this record?’);” CommandName=”Delete”>Delete </ItemTemplate> </asp:TemplateField>
VB.NET – Single file upload
WUI View Home | Upload File | Close Window Enter requested information: Your name X File title: File category: ComedyPlease select…Sci-FiWild West File type: DivX Video FilePlease select…Windows movie videoAudio Video Interleave File Select a file to upload: Additional note: Designer view (expand) < %@ Import Namespace=”System.IO” %> < %@ Import Namespace=”System.Data.SqlClient” %> < %@ […]