User control: bullet list : BulletList « User Control and Master Page « ASP.Net

Home
ASP.Net
1.ADO.net Database
2.Ajax
3.Asp Control
4.Collections
5.Components
6.Data Binding
7.Development
8.File Directory
9.HTML Control
10.Language Basics
11.Login Security
12.Mobile Control
13.Network
14.Page
15.Request
16.Response
17.Server
18.Session Cookie
19.Sitemap
20.Theme Style
21.User Control and Master Page
22.Validation by Control
23.Validation by Function
24.WebPart
25.WPF
26.XML
ASP.Net » User Control and Master Page » BulletList 
User control: bullet list

<%@ Register 
    TagPrefix="My" 
    TagName="BulletList" 
    Src=".\BulletList.ascx" 
%>
<script runat=server>
Sub Page_Load(ByVal Sender as Object, ByVal E as EventArgs)
    If Not IsPostBack Then
       BL1.AddBullet("Circle""An item in the list.")
       BL1.AddBullet("Circle""Another item in the list.")
       BL1.AddBullet("Circle""Third item in the list.")
    End If
End Sub
Sub SubmitBtn_Click(Sender As Object, E As EventArgs)
    BL1.ClearList()
End Sub
</script>
<html>
<BODY TEXT="black" LINK="darkred" VLINK="darkred" ALINK="red" LEFTMARGIN="40" TOPMARGIN="40">
<form runat="server">
<Font Face="Tahoma">
<My:BulletList
    id="BL1" 
    runat="server"
    Caption="Sample Bullet List"
/>
<BR><BR>
<asp:button 
    id="butOK"
    text="Clear List"
    Type="Submit"
    OnClick="SubmitBtn_Click" 
    runat="server"
/>
</Font>
</form>
</body>
</html>


<%--
<script language="VB" runat="server">
Public WriteOnly Property Caption() As String
    Set
        lbl1.Text = value & "<BR><UL>"
    End Set
End Property
Public Sub AddBullet (BulletType, BulletText)
   lbl2.Text = lbl2.Text & "<LI Type=" _
       """" & BulletType & """>" _
       & BulletText
End Sub
Public Sub ClearList ()
   lbl2.Text = ""
End Sub
</script>
<asp:Label
    id="lbl1"
    runat="server"
    Text="<UL>"
/>
<asp:Label
    id="lbl2"
    runat="server"
/>
<asp:Label
    id="lbl3"
    runat="server"
    Text="</UL>"
/>



--%>
           
       
Related examples in the same category
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.