Skip to main content

Featured Post

How to use Tabs in ASP.NET CORE

I want to show Components in a tabs , so first of all create few components. In this project we have three components, First View Component  public class AllViewComponent : ViewComponent     {         private readonly UserManager<ApplicationUser> _userManager;         public AllViewComponent(UserManager<ApplicationUser> userManager)         {             _userManager = userManager;         }         public async Task<IViewComponentResult> InvokeAsync()         {             List<StudentViewModel> allUsers = new List<StudentViewModel>();             var items = await _userManager.Users.ToListAsync();             foreach (var item in items)             {                 allUsers.Add(new StudentViewModel {Id=item.Id, EnrollmentNo = item.EnrollmentNo, FatherName = item.FatherName, Name = item.Name, Age = item.Age, Birthdate = item.Birthdate, Address = item.Address, Gender = item.Gender, Email = item.Email });             }            

How to use BulletedList Control in ASP.NET

Introduction
The BulletedList control is a standard web server control used to display items in the form of a bulleted list on a web page.
This control has no non-inherited methods. The BulletedList inherits the ListControl class.
Public Properties of the BulletedList class
AutoPostBack : Obtains or sets the value of the AutoPostBack property of the control for the base class
BulletImageUrl : Obtains or sets the path to an image to display each bullet in a control.
BulletStyle : Obtains or sets the style of the bullets for the BulletedList control.
Controls : Obtains a ControlCollection collection for the control.
DisplayMode : Obtains or sets the display mode of the list items appearing in a BulletedList control.
FirstBulletNumber : Obtains or sets the value that starts the numbering of list items in an ordered BulletedList control
SelectedIndex: Obtains or sets the zero based index of the currently selected item in a bulletedList control.
SelectedItem : Obtains the currently selected item in a BulletedList control.
SelectedValue : Obtains or sets the value property of the selected ListItem object in the BulletedList control.
Target : Obtains or sets the target window to display the data of the Web page that is linked to when a hyperlink in a bulletedList control is clicked.
Text : Obtains or sets the text for the BulletedList control.
Public event of the BulletedList class
Click : Occurs when a link button in a BulletedList control is clicked.

To specify the bullet type to display the list item in a bulleted list control. you can set the BulletStyle property to one of the bullet types that are defined by the BulletStyle enumeration.

Bullet style of the BulletedList Control
NotSet : Represents an unspecified bulleted list style the browser automatically sets the style of the bulleted list.
Numbered : Represents the bullets in the form of numbers.
LowerAlpha : Represents the bullets in the form of lowercase letters.
UpperAlpha : Represents the bullets in the form of uppercase letters.
LowerRoman : Represents the bullets in the form of lowercase Roman numerals.
UpperRoman : Represents the bullets in the form of uppercase Roman numerals.
Disc : Represents the bullets in the form of a filled circle.
Circle : Represents the bullets in the form of a empty circle.
Square : Represents the bullets in the form of a filled square.
CustomImage : Represents the bullets in the form of a custom image.

Example of BulletedList Control

Database table
bulletdatabase

Code
<%@ Page Language="C#" %>
<!DOCTYPE html>
<script runat="server">
    protected void BulletedList1_Click(object sender, BulletedListEventArgs e)
    {
        if (e.Index ==0)
        {
            Image1.ImageUrl = "~/images/heroAccent.png";           
           
        }
        if (e.Index ==1)
        {
            Image1.ImageUrl = "~/images/orderedList0.png"; 
        }
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>   
        <br />
        Click the name to see the user&#39;s photo<asp:BulletedList ID="BulletedList1" runat="server" DataSourceID="SqlDataSource1" DataTextField="username" DataValueField="Id" DisplayMode="LinkButton" OnClick="BulletedList1_Click">
        </asp:BulletedList>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT * FROM [usertable]"></asp:SqlDataSource>   
    </div>
        <asp:Image ID="Image1" runat="server" Height="110px" Width="110px" />
        <br />
    </form>
</body>
</html>
Output

bulleted list
Related article



Comments

Popular Post

Polynomial representation using Linked List for Data Structure in 'C'

Polynomial representation using Linked List The linked list can be used to represent a polynomial of any degree. Simply the information field is changed according to the number of variables used in the polynomial. If a single variable is used in the polynomial the information field of the node contains two parts: one for coefficient of variable and the other for degree of variable. Let us consider an example to represent a polynomial using linked list as follows: Polynomial:      3x 3 -4x 2 +2x-9 Linked List: In the above linked list, the external pointer ‘ROOT’ point to the first node of the linked list. The first node of the linked list contains the information about the variable with the highest degree. The first node points to the next node with next lowest degree of the variable. Representation of a polynomial using the linked list is beneficial when the operations on the polynomial like addition and subtractions are performed. The resulting polynomial can also

How to use Tabs in ASP.NET CORE

I want to show Components in a tabs , so first of all create few components. In this project we have three components, First View Component  public class AllViewComponent : ViewComponent     {         private readonly UserManager<ApplicationUser> _userManager;         public AllViewComponent(UserManager<ApplicationUser> userManager)         {             _userManager = userManager;         }         public async Task<IViewComponentResult> InvokeAsync()         {             List<StudentViewModel> allUsers = new List<StudentViewModel>();             var items = await _userManager.Users.ToListAsync();             foreach (var item in items)             {                 allUsers.Add(new StudentViewModel {Id=item.Id, EnrollmentNo = item.EnrollmentNo, FatherName = item.FatherName, Name = item.Name, Age = item.Age, Birthdate = item.Birthdate, Address = item.Address, Gender = item.Gender, Email = item.Email });             }            

Memory representation of Linked List Data Structures in C Language

                                 Memory representation of Linked List              In memory the linked list is stored in scattered cells (locations).The memory for each node is allocated dynamically means as and when required. So the Linked List can increase as per the user wish and the size is not fixed, it can vary.                Suppose first node of linked list is allocated with an address 1008. Its graphical representation looks like the figure shown below:       Suppose next node is allocated at an address 506, so the list becomes,   Suppose next node is allocated with an address with an address 10,s the list become, The other way to represent the linked list is as shown below:  In the above representation the data stored in the linked list is “INDIA”, the information part of each node contains one character. The external pointer root points to first node’s address 1005. The link part of the node containing information I contains 1007, the address of