Click here to Skip to main content
15,908,906 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: selected Text Pin
J4amieC30-Oct-07 2:25
J4amieC30-Oct-07 2:25 
QuestionEvent Fire in Drop Down List Pin
Rinki Mukheraji29-Oct-07 23:54
Rinki Mukheraji29-Oct-07 23:54 
AnswerRe: Event Fire in Drop Down List Pin
pmarfleet30-Oct-07 0:06
pmarfleet30-Oct-07 0:06 
AnswerRe: Event Fire in Drop Down List Pin
codeproject_Tarun30-Oct-07 0:06
codeproject_Tarun30-Oct-07 0:06 
AnswerRe: Event Fire in Drop Down List Pin
Sandeep Akhare30-Oct-07 0:11
Sandeep Akhare30-Oct-07 0:11 
GeneralRe: Event Fire in Drop Down List Pin
Rinki Mukheraji30-Oct-07 0:16
Rinki Mukheraji30-Oct-07 0:16 
GeneralRe: Event Fire in Drop Down List Pin
Sandeep Akhare30-Oct-07 0:19
Sandeep Akhare30-Oct-07 0:19 
AnswerRe: Event Fire in Drop Down List Pin
John-ph30-Oct-07 0:14
John-ph30-Oct-07 0:14 
Here is a piece of code that works fine in my system. just check with this you are doing it right...
HTML
-----
<-asp:dropdownlist id="DropDownList1" runat="server"
 0nSelectedIndexChanged="dropdownlist_SelectedIndexChanged" AutoPostBack="True"></asp:dropdownlist>

Code-Behind
------------
 private void Page_Load(object sender, System.EventArgs e) 
{ 
  if (!Page.IsPostBack) { 
    DropDownList1.Items.Insert(0, new ListItem("First", "1")); 
    DropDownList1.Items.Insert(1, new ListItem("Second", "2")); 
    DropDownList1.Items.Insert(2, new ListItem("Third", "3")); 
  }
} 
public void dropdownlist_SelectedIndexChanged(object sender, System.EventArgs e) 
{ 
    Label1.Text = DropDownList1.SelectedItem.Text; 
} 

Note: SelectedIndexChanged event will fire only when you change the dropdown item.

 Regards
 - J O H N -



GeneralRe: Event Fire in Drop Down List Pin
Rinki Mukheraji30-Oct-07 0:26
Rinki Mukheraji30-Oct-07 0:26 
GeneralRe: Event Fire in Drop Down List Pin
Rinki Mukheraji30-Oct-07 0:32
Rinki Mukheraji30-Oct-07 0:32 
GeneralRe: Event Fire in Drop Down List Pin
John-ph30-Oct-07 0:39
John-ph30-Oct-07 0:39 
GeneralRe: Event Fire in Drop Down List Pin
Rinki Mukheraji30-Oct-07 0:42
Rinki Mukheraji30-Oct-07 0:42 
GeneralRe: Event Fire in Drop Down List Pin
John-ph30-Oct-07 2:26
John-ph30-Oct-07 2:26 
AnswerRe: Event Fire in Drop Down List Pin
Mogha Ritesh30-Oct-07 0:15
Mogha Ritesh30-Oct-07 0:15 
GeneralRe: Event Fire in Drop Down List Pin
Rinki Mukheraji30-Oct-07 0:30
Rinki Mukheraji30-Oct-07 0:30 
AnswerRe: Event Fire in Drop Down List Pin
Ahmad Adnan30-Oct-07 1:54
Ahmad Adnan30-Oct-07 1:54 
QuestionRedirection problem [modified] Pin
Krishna Varadharajan29-Oct-07 23:30
Krishna Varadharajan29-Oct-07 23:30 
AnswerRe: Redirection problem Pin
InsDev29-Oct-07 23:38
InsDev29-Oct-07 23:38 
GeneralRe: Redirection problem Pin
Krishna Varadharajan29-Oct-07 23:51
Krishna Varadharajan29-Oct-07 23:51 
GeneralRe: Redirection problem Pin
InsDev29-Oct-07 23:59
InsDev29-Oct-07 23:59 
GeneralRe: Redirection problem Pin
Krishna Varadharajan30-Oct-07 0:52
Krishna Varadharajan30-Oct-07 0:52 
GeneralRe: Redirection problem Pin
Krishna Varadharajan30-Oct-07 1:09
Krishna Varadharajan30-Oct-07 1:09 
AnswerRe: Redirection problem Pin
John-ph29-Oct-07 23:40
John-ph29-Oct-07 23:40 
GeneralRe: Redirection problem Pin
Krishna Varadharajan29-Oct-07 23:54
Krishna Varadharajan29-Oct-07 23:54 
GeneralRe: Redirection problem Pin
John-ph30-Oct-07 0:03
John-ph30-Oct-07 0:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.