2

I am having a drop down binded from the database. On selectedindexchanged of dropdown i will enable some other controls this was working fine when i build my application and running properly. But when i create a virtual folder in the default website of IIS and access the project path for that virtual folder and running Dropdown_selectedInedexChanged event was not firing can any one tell why.

Developer
  • 8,390
  • 41
  • 129
  • 238

1 Answers1

0

Add the event handler in the code behind:

Protected void Page_Load(ByVal sender As Object, ByVal e As EventArgs) 
    //...other code
    ddlMyOne.SelectedIndexChanged += new EventHandler(ddlMyOne_SelectedIndexChanged);
    ddlMyOne.AutoPostBack = true;
    //other code...
End Sub 

protected void ddlMyOne_SelectedIndexChanged(object sender, EventArgs e)
    {
        // Your handler code
    }
Kangkan
  • 15,267
  • 10
  • 70
  • 113
  • This was added already in the control event that was not sufficient na – Developer Mar 14 '11 at 11:48
  • @Dorababu: So, you have the handler addition in the page_load? Why not publish some of your code segment for people to understand what you have done and tried already? – Kangkan Mar 14 '11 at 11:49
  • I had not add handler but for the control i set Autopostback to true and select the event from Events property is it ok are i have to do as per you said – Developer Mar 14 '11 at 11:52
  • So try adding the handler as well. – Kangkan Mar 14 '11 at 11:54