asp.net - DropDownList always returns first item in Iron Speed -


i using dropdownlist in iron speed. problem returns first item in selection, though use page.ispostback. code:

protected overrides sub populatepaidbycompperioddropdownlist(         _byval selectedvalue string,         _byval maxitems integer)     me.paidbycompperiod.items.clear()     if (not page.ispostback)         dim connectionstring string = configurationmanager                 .connectionstrings("database").connectionstring         dim conn new sqlconnection(connectionstring)         conn.open()         dim comm sqlcommand = new sqlcommand("select  distinct periodnumber,                 convert(varchar(10), perioddateto, 23) payrolldate,                 year(payrolldate) yeardate payroll order payrolldate                 desc", conn)         dim reader sqldatareader = comm.executereader         while reader.read             paidbycompperiod.items.add(new listitem(monthname(month(cdate(                     reader.getstring(1)))) & " " & day(cdate(reader.getstring(1)))                     & ", " & year(cdate(reader.getstring(1))), reader.getint32(0)                     .tostring))             dropdownlist.items.add(new listitem(reader.getstring(0).tostring,                     reader.getstring(1).tostring))         end while         reader.close()         conn.close()         paidbycompdate.text = cdate(paidbycompperiod.selecteditem.text)                 .tostring("mm/dd/yyyy")     end if end sub 

how can solve issue?


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -