Hello,
I have a web page which has both asp.net controls as well as AJAX controls.I am facing a weird issue when I introduce some AJAX controls the button onClick event stops firing.Can anyone suggest what might be the reason for this?
Here is my code:
I have a web page which has both asp.net controls as well as AJAX controls.I am facing a weird issue when I introduce some AJAX controls the button onClick event stops firing.Can anyone suggest what might be the reason for this?
Here is my code:
Code:
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Entity.aspx.cs" Inherits="Entity" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeaderImagePlaceHolder" Runat="Server">
<img src="images/image5.jpg" alt="NewsPageImage" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" Runat="Server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager_TabContainer" runat="server">
</asp:ToolkitScriptManager>
<asp:TabContainer ID="TabContainer_Metadata" runat="server" Width="150%" ActiveTabIndex="1">
<asp:TabPanel ID="TabPanel_Details" runat="server" HeaderText="Details" ScrollBars="Horizontal">
<ContentTemplate>
<div style="vertical-align: top;height:800px; width:730px">
<asp:Label ID="Label_GridText" runat="server"></asp:Label>
<br /><br />Start Month
<asp:DropDownList ID="Dropdown_StartMonth" runat="server">
<asp:ListItem>--Select--</asp:ListItem>
</asp:DropDownList>
Start Date
<asp:DropDownList ID="DropDownList_StartDay" runat="server">
<asp:ListItem>--Select--</asp:ListItem>
</asp:DropDownList>
Start Year
<asp:DropDownList ID="DropDownList_StartYear" runat="server"><asp:ListItem>--Select--</asp:ListItem></asp:DropDownList>
<asp:Label ID="StartDate_Error" Text="Start Date entered incorrectly" ForeColor="Red" runat="server"></asp:Label>
<br /><br />Start Month
<asp:DropDownList ID="DropDownList_EndMonth" runat="server">
<asp:ListItem>--Select--</asp:ListItem>
</asp:DropDownList>
Start Date
<asp:DropDownList ID="DropDownList_EndDay" runat="server">
</asp:DropDownList>
Start Year
<asp:DropDownList ID="DropDownList_EndYear" runat="server"><asp:ListItem>--Select--</asp:ListItem></asp:DropDownList>
<asp:Label ID="EndDate_Error" Text="End Date entered incorrectly" ForeColor="Red" runat="server"></asp:Label>
<br /><br />
<asp:Button ID="Button_Preview" runat="server" Text="Preview" onclick="Button_Preview_Click" />
<asp:Label ID="Label_OutsideBounds" ForeColor="Red" runat="server"></asp:Label>
<div style="vertical-align: top;overflow:scroll">
<asp:GridView ID="Gridview_Details" runat="server"></asp:GridView></div><br /><br />
</div>
<!-- The preview button onClick event stops firing when I introduce this code -->
<asp:Button ID="Linkbutton_Download" runat="server" OnClick="Linkbutton_Download_OnClick" Text="Download"/> <br />
<asp:Panel ID="download_details" CssClass="ModalPanel" runat="server" ScrollBars="Both">
<p>
<strong>
<font size="6">Data Access Form</font>
</strong>
</p>
<p>
<font size="3">
Users must provide the following information to download dataset in order to enable data providers to track usage,
evaluate its impact in the community, and confirm users’ acceptance.
</font>
</p>
<table id="Table1" cellspacing="1" cellpadding="1">
<tr>
<td valign="top">
<strong>Email:</strong></td>
<td valign="top"><asp:TextBox id="usrEmail" runat="server" AutoPostBack="True" ontextchanged="usrEmail_TextChanged"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator id="emailReqValidator" runat="server" ErrorMessage="Please provide your email address." ControlToValidate="usrEmail"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td valign="top"><strong>Name:</strong></td>
<td valign="top">
<asp:TextBox id="usrName" runat="server"></asp:TextBox></td>
<td>
<asp:RequiredFieldValidator id="usrNameValidator" runat="server" ErrorMessage="Please provide your name." ControlToValidate="usrName"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td valign="top">
<strong>Association:</strong></td>
<td valign="top">
<asp:DropDownList id="ddlAssoc" runat="server">
<asp:ListItem Value="University">University</asp:ListItem>
<asp:ListItem Value="P-12 Education">P-12 Education</asp:ListItem>
<asp:ListItem Value="Industry">Industry</asp:ListItem>
<asp:ListItem Value="State/Local Government">State/Local Government</asp:ListItem>
<asp:ListItem Value="Federal Government">Federal Government</asp:ListItem>
<asp:ListItem Value="NGO">Non-Government Organization</asp:ListItem>
<asp:ListItem Value="Others">Others</asp:ListItem>
</asp:DropDownList>
</td>
<td>
<asp:RequiredFieldValidator id="assocValidator" runat="server" ErrorMessage="Please provide your association." ControlToValidate="ddlAssoc"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td valign="top">
<strong>Usage:</strong></td>
<td valign="top">
<asp:DropDownList id="ddlUsage" runat="server">
<asp:ListItem Value="Research">Research</asp:ListItem>
<asp:ListItem Value="Education">Education</asp:ListItem>
<asp:ListItem Value="Other">Other</asp:ListItem>
</asp:DropDownList>
</td>
<td><asp:RequiredFieldValidator id="usageValidator" runat="server" ErrorMessage="Please provide your intended usage of data." ControlToValidate="ddlUsage"></asp:RequiredFieldValidator>
</td>
<tr>
<td valign="top">
<br />
<br />
<asp:Button id="btnContinue" runat="server" Text="Continue" onclick="btnContinue_Click"></asp:Button>
<asp:Button id="Button_Close" runat="server" Text="Close" onclick="Button_Close_Click"></asp:Button>
</td>
</tr>
</table>
</asp:Panel>
<asp:ModalPopupExtender ID="PopupExtender" TargetControlID="Linkbutton_Download" PopupControlID="download_details" CancelControlID="Button_Close" BackgroundCssClass="modalBackground"
runat="server" DynamicServicePath="" Enabled="True"></asp:ModalPopupExtender>
</ContentTemplate>
</asp:TabPanel>
<asp:TabPanel ID="TabPanel_Meta" runat="server" HeaderText="Metadata"> </asp:TabPanel>
</asp:TabContainer>
</asp:Content>