Home » 2012 » January

Archive for January, 2012

VB.NET – Limited user (checkbox) selection

I found this script very helpful while designing surveys for my organization. This post applies to: – MS SQL server 2005+ – VB.NET – VS2010 – .NET 4.0 Framework Javascript code <asp:content ID=”Content1″ ContentPlaceHolderID=”HeadContent” Runat=”Server”> <script type=”text/javascript” language=”javascript”> function CheckCheck() { var chkBoxList = document.getElementById(‘< %=CheckBoxList1.ClientID %>’); var chkBoxCount = chkBoxList.getElementsByTagName(“input”); var btn = document.getElementById(‘< [...]

VB.NET – SQL statement “LIKE”

Input box Please enter customer first or last name: <asp:RequiredFieldValidator ID=”ReqSearchfor” runat=”server” ErrorMessage=”<font color=’red’>Input box can not be empty!</font>” ControlToValidate=”SearchFor” > <asp:TextBox ID=”SearchFor” runat=”server”> <asp:Button ID=”SearchBtn” runat=”server” Text=”Search” /> SQL DataSource Design <asp:SqlDataSource ID=”SearchResults” runat=”server” ConnectionString=”< %$ myConString %>” SelectCommand=”SELECT * FROM [CustomerTbl] WHERE ([customer_name] LIKE ‘%’ + @customer_name + ‘%’)” <SelectParameters> <asp:ControlParameter ControlID=”SearchFor” Name=”customer_name” [...]

CSS Horizontal Navigation Menu

CSS code – horizontal navigation menu /* ‘defines width, font and position */ #nav { font-family: verdana, sans-serif; position: relative; width: 100%; font-size:11px; color:#FFF; padding-top: 0px; } /* ‘defines list type */ #nav ul { list-style-type: none; background-color: #000; } /* ‘defines the drop-down container */ #nav ul li { float: left; position: relative; height: [...]