ASP.NET Pre-Defined DropdownListings

ASP.NET Code behing
default.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Netstair Tools!
    </h2>
    <p>
        States: <asp:DropDownList ID="ddlUnitedStates" runat="server"></asp:DropDownList><br />
        County: <asp:DropDownList ID="ddlCountryListing" runat="server"></asp:DropDownList><br />
        Vehicles: <asp:DropDownList ID="ddlVehiclesLsiting" runat="server"></asp:DropDownList><br />
        Referral: <asp:DropDownList ID="ddlReferrals" runat="server"></asp:DropDownList><br />
        Preferred Language: <asp:DropDownList ID="ddlPreferredLanguage" runat="server"></asp:DropDownList><br />
        Ethnenicy: <asp:DropDownList ID="ddlEthnicity" runat="server"></asp:DropDownList><br />
        Education: <asp:DropDownList ID="ddlEducation" runat="server"></asp:DropDownList><br />
        Calendar Month: <asp:DropDownList ID="ddlMonthCanlendar" runat="server"></asp:DropDownList><br />
        Calendar Year: <asp:DropDownList ID="ddlYearCalendar" runat="server"></asp:DropDownList><br />
        Credit Card: <asp:DropDownList ID="ddlCreditCard" runat="server"></asp:DropDownList><br />
    </p>    
</asp:Content>
default.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ncTools;   //- Make sure the ncTools.DLL Assembly in your BIN Folder

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        DropListing oCtrl = new DropListing();
        //- United States Listing
        oCtrl.UnitedStatesListing(ddlUnitedStates);
        //- World Countries Listing
        oCtrl.CountriesListing(ddlCountryListing);
        // Vehicles Listing
        oCtrl.VehicleMakeListing(ddlVehiclesLsiting);
        //- Referrals Listing
        oCtrl.ReferralListing(ddlReferrals);
        //- Preferred Language
        oCtrl.PreferredLanguageListing(ddlPreferredLanguage);
        //- Ethnicity Listing
        oCtrl.EthnicityListing(ddlEthnicity);
        //- Education Listing
        oCtrl.EducationListing(ddlEducation);
        //- Month Calendar
        oCtrl.CalendarPeriodListing(ddlMonthCanlendar,eCalendarType.Month);
        //- Year Calendar
        oCtrl.CalendarPeriodListing(ddlYearCalendar, eCalendarType.Year);
        //- Credit Cards Listing
        oCtrl.CreditCardListing(ddlCreditCard, eCreditCardTypeListing.ADMV);
        //- Kill the Object
        oCtrl.Dispose();
    }
}
Download the .DLL Assembly ncTools.zip

Add Feedback