Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
295
WebDataMenu with ImageButton in an ItemTemplate not working
posted

Hi,

I am having an issue with an ImageButton within an ItemTemplate.  When the click event is fired, it executes the server side code as expected, but then the page get stuck at 'Waiting for host'.  Below the date control that I want to update I have another ImageButton that executes the same click event, which works fine.

I am running with VS2012, Windows 7, IE 10, and you can see my Infragisticts control version below.

 

Here is my aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %>

<%@ Register Assembly="Infragistics45.Web.v13.1, Version=13.1.20131.2107, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"    Namespace="Infragistics.Web.UI.EditorControls" TagPrefix="ig" %>

<%@ Register Assembly="Infragistics45.Web.v13.1, Version=13.1.20131.2107, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"    Namespace="Infragistics.Web.UI.NavigationControls" TagPrefix="igtbar" %>

<%@ Register Assembly="Infragistics45.Web.v13.1, Version=13.1.20131.2107, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"    Namespace="Infragistics.Web.UI" TagPrefix="ig" %>

<html>

<head runat="server">   

<title>Testing Page</title>   

<meta http-equiv="X-UA-Compatible" content="IE=10" />   

<link href="CSS/Menu.css" type="text/css" rel="stylesheet" />

</head>

<body>   

<form id="form1" runat="server">      

<asp:ScriptManager ID="ScriptManager1" runat="server">      

</asp:ScriptManager>               

<igtbar:WebDataMenu ID="WebDataMenu1" runat="server" EnableAppStyling="True" StyleSetName="Office2007Blue" Height="54px" Width="100%">            

<GroupSettings Orientation="Horizontal" />            

<Items>               

<igtbar:DataMenuItem Key="btnNew" ToolTip="Clears the form." TemplateId="ItemTemplate2">               

</igtbar:DataMenuItem>    

</Items>            

<Templates>               

<ig:ItemTemplate runat="server" ID="ItemTemplate3" TemplateID="ItemTemplate2">                  

<Template>                     

<div id="Div2" runat="server">                        

<asp:ImageButton ID="btnNew" runat="server" ImageUrl="./Images/newQuery.png" OnClick="btnNew_Click" />                        

<br />                        

<asp:Label ID="Label2" runat="server" Text="New"></asp:Label>                     

</div>                  

</Template>               

</ig:ItemTemplate>            

</Templates>         

</igtbar:WebDataMenu>

      <asp:UpdatePanel ID="UpdatePanel2" runat="server">         

<ContentTemplate>            

<div>               

<ig:WebDatePicker runat="server" ID="dateChooser" DropDownCalendarID="webMonthCalendar" Culture="en-US" Width="194px" StyleSetName="Office2007Blue" StyleSetPath="~/ig_res">                  

<Buttons CustomButtonDisplay="OnRight">                     

<CustomButton ImageUrl="~/Images/calendar.gif" />                  

</Buttons>               

</ig:WebDatePicker>               

<ig:WebMonthCalendar runat="server" ID="webMonthCalendar" Culture="en-us" FooterContent="Today: {0:d}" StyleSetName="Office2007Blue" Width="194px" StyleSetPath="~/ig_res"                   EnableWeekNumbers="false" ChangeMonthToDateClicked="true" EnableMonthDropDown="True" EnableYearDropDown="True" SelectionType="Single">               

</ig:WebMonthCalendar>            

</div>         

</ContentTemplate>      

</asp:UpdatePanel>      

<div>         

<asp:ImageButton runat="server" ID="btnNewQuery" ImageUrl="./Images/newQuery.png" OnClick="btnNew_Click" />         

<br />   

 <asp:Label ID="Label1" runat="server" Text="New"></asp:Label>   

</div>

   </form>

</body>

</html>

Here is my code behind:

using System; using System.Collections.Generic;

using System.Linq; using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class test : System.Web.UI.Page

 {

    protected void Page_Load(object sender, EventArgs e)   

 {

       dateChooser.Date = DateTime.Today;

   }

   protected void btnNew_Click(object sender, ImageClickEventArgs e)   

{

       dateChooser.Date = DateTime.MinValue;   

 }

}

 

Thanks,

Gregory

Parents
No Data
Reply
  • 295
    Verified Answer
    posted

    Well I don't understand why this was causing the issue, but if I remove the div tags from within my template the issue is resolved.

Children
No Data