Question How to call DropDownList SelectedIndexChanged on masterpage from content page?

raysefo

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

I have a dropdownlist and i would like to call selectedIndexchanged event of it from content page.

Is there a way to do this?

thanks in advance.

Best Regards.
 
thanks so much for your answer kulrom, i will try it. bytheway where were you? I asked couple of questions, you did not answer :)
 
kulrom,

I m trying to reach dropdownlist on content page's page_load like below. But the problem is ,dropdown does not change to index what i want! Should i place the code into page_init or somewhere else?

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Dim ddl As DropDownList = CType(Master.FindControl("ddlLanguage"), DropDownList)
ddl.SelectedIndex = 1

End If

End Sub
 
I got what i want :) Problem solved but i want to know what is the difference between cookie and application? I used application instead of cookie in my begin application method in global.asax. Its working.
 
what is the difference between cookie and application? I used application instead of cookie in my begin application method in global.asax. Its working.
ASP.NET State Management Overview
Cookie is stored at client per user, Application state is stored at server globally for all users.
 
Back
Top