ASP.Net/HTML Control/BulletList
Use asp:Label to create a bulleted list (VB.net)
<source lang="csharp">
<%@ Page Language="VB" %> <script runat="server">
Sub Button1_Click(sender As Object, e As EventArgs) Dim fullString, subString As String Dim startPos, length As Integer startPos = CInt(TextBox2.Text) length = CInt(TextBox3.Text) fullString = TextBox1.Text subString = fullString.SubString(startPos, length) Label1.Text = subString End Sub Sub Button2_Click(sender As Object, e As EventArgs) Dim myString As String Dim myWords As String() myString = TextBox1.Text myWords = myString.Split(" ".toCharArray()) " Start bulleted listLabel1.Text = "
- "
Dim word As String
For Each word in myWords
Label1.Text = Label1.Text & "
- " & word & " "
Next word " End bulleted listLabel1.Text = Label1.Text & ""
End Sub
</script> <html> <head> </head> <body>
<form runat="server">
<asp:TextBox id="TextBox1" runat="server" TextMode="MultiLine" Width="259px" Height="112px"></asp:TextBox>
start: <asp:TextBox id="TextBox2" runat="server"></asp:TextBox>
length: <asp:TextBox id="TextBox3" runat="server"></asp:TextBox>
<asp:Label id="Label1" runat="server"></asp:Label>
<asp:Button id="Button1" onclick="Button1_Click" runat="server" Text="Show Substring"></asp:Button> <asp:Button id="Button2" onclick="Button2_Click" runat="server" Text="Split"></asp:Button>
</form>
</body> </html>
</source>