How to add asp.net checkboxlist scrollbar in asp.net using c sharp

3 Comments | 6526 Views | Post by: Admin | Tags: add asp.net checkboxlist scrollbar in asp.net using c sharp, asp.net checkboxlist scrollbar,checkboxlist scrollbar


In this Tutorial we are going to learn to add asp.net checkboxlist scrollbar in asp.net using c sharp.


Introduction:-
In this Tutorial we are going to learn to add asp.net checkboxlist scrollbar in asp.net using c sharp.

Description:-
In previous articles, I have explained you How to find datetime difference in milli seconds using ASP.NET using c# example , How to do Cross-Page Posting in Asp.Net and C# , How to use UpdateProgress control in Asp.Net and C Sharp , How to play YouTube videos in ASP.NET Web Application, How to develop a Simple Chat Application in C# Using SignalR
and now we are going to learn how to add scrollbar in asp.net checkboxlist.

So lets starts the coding.:-)

Step 1: First, we start by creating an Empty ASP.NET web site in Visual Studio .NET 2010.


http://www.sourcecodehub.com/articleimages/ajax-timer-control-in-aspnet/Create-website-visual-studio-1

Create-website-visual-studio-new-website2


Step 2: Create an ASPX Page for Right Click on Solution Explorer > Add Items > Web > Webform and save it as "Default.aspx".When we first open our Default.aspx page

add-new-webform-visual-studio-3

add-new-webform-visual-studio-add-name4

Step 2: Now write the below codes in asp.net design mode.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="aspnet_checkboxlist_scrollbar_source_code.WebForm1" %>



"http://www.w3.org/1999/xhtml">"server">

"form1" runat="server">

"color: orange; font-style: italic;">How to add scrollbar in checkboxlist or checkboxlist scrollbar in asp.net csharp


class="line" />
 
class="block"> "CheckBoxList1" runat="server" RepeatLayout="Table">


Step 3: Now write the below codes in code behind.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace aspnet_checkboxlist_scrollbar_source_code
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                string[] dotnet = {   
                                 "asp.net",  
                                 "c sharp",  
                                 "sql server",  
                                 "asp.net mvc",  
                                 "wcf",  
                                 "jQuery",  
                                 "wpf",  
                                 "ado.net"  
                             };

                CheckBoxList1.DataSource = dotnet;
                CheckBoxList1.DataBind();
            }  
        }
    }
}

Step 4: Run the application by pressing F5.You will see the smiliar screenshot as below

Conclusion:
So, In this tutorial we have learned, How to add asp.net checkboxlist scrollbar in asp.net using c sharp

 

Download Source Codes


Post Comments

if you have some suggestion, question, request on How to add asp.net checkboxlist scrollbar in asp.net using c sharp.

Please use the comment box to express your views.

 

Comments:

loading...