Аноним
Зарегистрирован: 18 February 2005
Сообщения: 13860
Примеры кода: 0
|
не устанавливает SelectedValue в ddl UC после postback-a |
18 September 2006 16:25 |
|
|
|
|
в uc:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim dtCalendarList As System.Data.DataTable
'......
CalendarDropDownList.DataSource = dtCalendarList
CalendarDropDownList.DataTextField = "Name_Rus"
CalendarDropDownList.DataValueField = "ID"
'CurrentCalendar приходит правильным, но в итоге не устанавливается на странице как selected
CalendarDropDownList.SelectedValue = CurrentCalendar
Me.DataBind()
End Sub
страница-контейнер:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' ...
If Not UcCalendarList.CalendarDropDownList.SelectedValue = Nothing Then
calendarID = UcCalendarList.CalendarDropDownList.SelectedValue
End If
If Not UcYearList.YearDropDownList.SelectedValue = Nothing Then
year = CType(UcYearList.YearDropDownList.SelectedValue, System.Int32)
End If
UcCalendarList.CurrentCalendar = calendarID
UcYearList.CurrentYear = year.ToString()
Page.DataBind()
End Sub
Данное сообщение получено с сайта RSDN
|
|