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.
Asked
Active
Viewed 139 times
2
-
Similar to: http://stackoverflow.com/questions/570294/asp-net-c-dropdownlist-selectedindexchanged-in-server-control-not-firing – Kangkan Mar 14 '11 at 11:53
-
@Kangkan this was different from you specified i am unable to get the event fire when i create a virtual folder in IIS and running – Developer Mar 14 '11 at 11:54
-
Are the rest of the features working? – Kangkan Mar 14 '11 at 11:56
1 Answers
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
-