Home » 2012 (Page 6)

Archive for 2012

ASP.NET Validator – validate one of the two values

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

List Directory Content with Bulleted List Hyperlink – VB.NET

Code Behind Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) ‘ make a reference to a directory Dim DirPath As New IO.DirectoryInfo(“C:\\My_Website\My_Folder”) Dim FCollect As IO.FileInfo() = DirPath.GetFiles() Dim FInfo As IO.FileInfo ‘list the names of all files in the specified directory For Each FInfo In FCollect ‘bind url to line item – […]

Css round corners button

html code < asp:Button ID="SubmitBtn" runat="server" Text="Next ►" CssClass="btnSubmit" CausesValidation="true"/> css properties .btnSubmit { color: #FFF; text-decoration: none; border: 1px solid #C8C8C8; padding: 1px 3px 2px 5px; background-color: #1A503E; font-size: 13px; border-radius: 6px 6px / 6px 6px; }