D
Dan
Hi,
i defined a dropdownlist in code-behind but i can't get the selectedvalue. I
czn't use autopostback because there are other elements in the form to be
filled.
aspx file:
<aspropDownList ID="minw" runat="server">
</aspropDownList>
<asp:Button ID="Button1" runat="server" />
code-behind::
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim z As ListItem
minw.Items.Clear()
For i = 0 To 200
z = New ListItem(i, i)
minw.Items.Add(z)
Next
.....
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim mi As Integer
mi = minw.SelectedValue
.....
This returns 0 (first value).
Thanks
Dan
i defined a dropdownlist in code-behind but i can't get the selectedvalue. I
czn't use autopostback because there are other elements in the form to be
filled.
aspx file:
<aspropDownList ID="minw" runat="server">
</aspropDownList>
<asp:Button ID="Button1" runat="server" />
code-behind::
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim z As ListItem
minw.Items.Clear()
For i = 0 To 200
z = New ListItem(i, i)
minw.Items.Add(z)
Next
.....
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim mi As Integer
mi = minw.SelectedValue
.....
This returns 0 (first value).
Thanks
Dan