
Untitled
By: a guest on
May 1st, 2010 | syntax:
VB.NET | size: 0.86 KB | hits: 125 | expires: Never
Imports System.IO
Public Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim test As String = String.Empty
If IsPostBack Then
test = "PostBack"
Else
test = "not a post back event"
End If
End Sub
Protected Sub btnDoSomething_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnDoSomething.Click
Dim output As String = String.Empty
For Each li As ListItem In CheckBoxList1.Items
If (li.Selected) Then
If (output.Trim = String.Empty) Then
output = li.Text
Else
output = String.Format("{0} {1}", output, li.Text)
End If
End If
Next
End Sub
End Class