The ASP.NET datalist can be bound to a datasource if you have one, but for real flexability you may want to bind the code at runtime. This sample shows how to bind the datalist at runtime using Linq. The list consists of a number of links, to which both the url and the description will […]
Category: ASP.NET Webforms
Styling your dropdownlist and dropdownlist items in ASP.NET
Dropdownlists are a much used component in ASP.NET web development. While styling the dropdownlist in it’s default state is intuitive, styling the list items themselves is not. First things first, we will use the following CSS for the styling: .DropDownListStyle { margin-top: 8px; } .DropDownListItemStyle { background-color: #eee; margin: 8px; padding: 8px; } As you […]
Prevent double clicking on a button
Processing postbacks can be a lengthy experience at times, if you need to do a lot of processing, or a confronted with a slow server. Users may be tempted to either click again, or just simply think they need to double click your button. This tiny piece of javascript can be added to a page […]