User Control button not firing from webform page

Thephonetech

New Member
I have created a user control for visitor to subscription of newsletter. UserControl is withing the update-panel and is added to the main master-page.Problem with the control is that Subscribe button is not firing for some reasonUser control markup:\[code\]<asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <table cellpadding="0" cellspacing="0" class="PrayerTimeWrapper"> <tr> <td align="center"> <table cellpadding="0" cellspacing="0" class="PrayerTimeInnerWrapper" border="0"> <tr> <td valign="top"> <div class="dHeading"><asp:Label ID="lblTitle" runat="server" Text="JOIN US"></asp:Label></div> <div class="dName"> <asp:TextBox ID="txtName" CssClass="txtSubscribe" runat="server" Text="NAME" onfocus="if(this.valuehttp://stackoverflow.com/questions/10881250/=='NAME')this.value='';" onblur="if(this.valuehttp://stackoverflow.com/questions/10881250/=='')this.value='http://stackoverflow.com/questions/10881250/NAME';"></asp:TextBox> </div> <div class="dEmail"> <asp:TextBox ID="txtEmail" CssClass="txtSubscribe" runat="server" Text="YOUR EMAIL" onfocus="if(this.valuehttp://stackoverflow.com/questions/10881250/=='YOUR EMAIL')this.value='';" onblur="if(this.valuehttp://stackoverflow.com/questions/10881250/=='')this.value='http://stackoverflow.com/questions/10881250/YOUR EMAIL';"></asp:TextBox> <asp:RequiredFieldValidator ID="rfvEmailSub" runat="server" ErrorMessage="*" ControlToValidate="txtEmail" ValidationGroup="SubEmail" ></asp:RequiredFieldValidator> <asp:RegularExpressionValidator ID="revEmailSub" runat="server" ErrorMessage="*" ControlToValidate="txtEmail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="SubEmail" ></asp:RegularExpressionValidator> </div> <div class="dSubmit"> <asp:Button ID="btnSubscribe" CssClass="btnSubscribe" runat="server" Text="Subscribe" onclick="btnSubscribe_Click" /> </div> </td> </tr> </table> </td> </tr> </table> </ContentTemplate></asp:UpdatePanel>\[/code\]User control code-behind:\[code\]protected void btnSubscribe_Click(object sender, EventArgs e){ Response.Write("Test");}\[/code\]Markup of the page which is using master-page:\[code\]<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="PrayerTiming.aspx.cs" Inherits="PrayerTiming" %><%@ Register Src="http://stackoverflow.com/questions/10881250/~/en/UserControls/ucSubscribe.ascx" TagName="Subscribe" TagPrefix="uc"%><asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server"></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server"> <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" /> <div align="center" id="table"></div> <uc:Subscribe id="ucSB" runat="server" UpdateMode="Conditional" /> </asp:Content>\[/code\]I am doing something wrong somewhere but i am not sure what. I would appreciate help on this.
 
Top