Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim ddl As New DropDownList
ddl.Items.Add("--Select--")
ddl.Items.Add("Ultimate")
ddl.Items.Add("Rengan")
ddl.Items.Add("Rengan1")
ddl.Items.Add("Rengan2")
ddl.Items.Add("Rengan4")
ddl.AutoPostBack = True
ddl.EnableViewState = True
AddHandler ddl.SelectedIndexChanged, AddressOf DropDownList1_SelectedIndexChanged
PlaceHolder1.Controls.Add(ddl)
Dim i As Integer
For i = 0 To ddl.Items.Count - 1
If i < 3 Then
ddl.Items(i).Attributes.Add("style", "font-weight:bold")
Else
'ddl.Items(i).Attributes.Add("style", "font-weight:italic")
End If
Next
End Sub
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
MsgBox("asd")
End Sub
End Class
No comments:
Post a Comment
Plz Share your comments...