actually, I don't know if this is a problem with the ajax or something else. I have a panel holding a formview tha uses modal popup to display it. I have an image button the uses it's click event to Show () the popup and it worked fine for a day or so. Now clicking the image button does nothing. It does not error but when debugging it just does not trigger the click event. I also noticed that when i look at the smart tab for the panel, it never asks if you want to remove the extender, even though there is one there.
The sourse for he image button , the panel (curtailed) and the modal popup are as follows:
<asp:ImageButton ID="imgaddlog" runat="server" ImageUrl="~/Images/Icons/addride.png" ToolTip="Add Log" Width="16px" OnClick="imgaddlog_Click" /><asp:Panel ID="pnlAdd" runat="server" CssClass="modalPanel" Width="700px" style="margin-top:10px; display:none"><asp:FormView ID="FormView1" runat="server" DataKeyNames="rideid" DataSourceID="SqlDataSource3" OnDataBound="FormView1_DataBound" OnModeChanged="FormView1_ModeChanged" Width="680px" DefaultMode="Insert"><ajaxToolkit:ModalPopupExtender ID="pnlAdd_ModalPopupExtender" runat="server" DynamicServicePath="" Enabled="True" OkControlID="InsertButton" TargetControlID="Button4" PopupControlID="pnlAdd" CancelControlID="InsertCancelButton"></ajaxToolkit:ModalPopupExtender><asp:Button ID="Button4" runat="server" Text="Button" style="display:none" />
and the click event this used to retreive the data and display it properly - now it does not fire.
:
protected void imgaddlog_Click(object sender, ImageClickEventArgs e) { rider rd = new rider(); FormView1.DefaultMode = FormViewMode.Insert; FormView1.Caption = "Enter Ride Data for: " + DateTime.Today.ToShortDateString() + " for " + rd.getdisplayname(rid); DropDownList ddlts = (DropDownList)FormView1.FindControl("ddltscale"); Char degree = (Char)176; string degreef = degree + "F"; string degreec = degree + "C"; ddlts.Items.Add(new ListItem(degreef, "I")); ddlts.Items.Add(new ListItem(degreec, "M")); pnlAdd_ModalPopupExtender.Show(); }