I having a dropdown Selected value and i want to get value currently it always shows value zero .
<label> Select :</label>
<asp:DropDownList ID="ddlist" runat="server">
<asp:ListItem value="0">--Select Value--</asp:ListItem>
<asp:ListItem value="1">Red</asp:ListItem>
<asp:ListItem value="2">orange</asp:ListItem>
</asp:DropDownList>
</br>
<asp:AjaxFileUpload ID="AjaxFileUpload11" runat="server" MaximumNumberOfFiles="5" Width="100%" OnUploadComplete="OnUploadComplete" />
Protected Sub OnUploadComplete(sender As Object, e As AjaxFileUploadEventArgs)
Dim fileName As String = Path.GetFileName(e.FileName)
AjaxFileUpload11.SaveAs(Server.MapPath(Convert.ToString("~/uploads/") & fileName))
Dim strConnString As String = ConfigurationManager.ConnectionStrings("conString").ConnectionString
Dim con As New SqlConnection(strConnString)
Dim strQuery As String = "insert into table(ID,filename) values(@ID, @filename)"
Dim cmd As New SqlCommand(strQuery)
cmd.Parameters.AddWithValue("@ID", cmbCategory.SelectedValue)
cmd.Parameters.AddWithValue("@filename", fileName)
cmd.CommandType = CommandType.Text
cmd.Connection = con
con.Open()
cmd.ExecuteNonQuery()
con.Close()
End Sub