Question How to get value from dropdown list from Master Page?

raysefo

Well-known member
Joined
Jul 21, 2010
Messages
207
Programming Experience
Beginner
Hi,

I have a master page and it has dropdownlist. On my other aspx which inherited from masterpage, i would like to get value of selected item on dropdown list. Any ideas?

Thanks in advance.

best regards
 
I found it
Dim ddl As DropDownList = Master.FindControl("cmbCulture")
If ddl.SelectedIndex >= 0 Then
_culture = ddl.SelectedValue
End If

But the main problem is, ı mean the reason i asked this question was, to manage globalization. But the thing is on content page, Page_Load does NOT work if i use;

Protected Overrides Sub InitializeCulture()

Dim _culture As String = ""
Dim ddl As DropDownList = Master.FindControl("cmbCulture")
If ddl.SelectedIndex >= 0 Then
_culture = ddl.SelectedValue
End If
If (String.IsNullOrEmpty(Culture)) Then

Culture = "tr-TR"
Me.UICulture = _culture
Me.Culture = _culture

End If



End Sub

Any help please?

Best Regards
 
Back
Top