Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am using Ajax tabcontainer and repeater to bind the data and also some other fields like session values. All are working fine but when comes to button click whether it is asp.net button or HTML button or link button or imagebutton or any other buttons available i have tried all those buttons in that binded page. Those buttons are not firing at all please anybody help me regarding this issue.

What I have tried:

In Page load
Label.Text = Session["Object"].ToString();
Label1.Text = Method().ToString(); // <-- This method is used get the details and append to asp.net label
int count = Convert.ToInt32(Method1()); // <-- This method1 is used to count the details
hdnCount.Value = count.ToString();
// It is used to get the details from database
// and binds to Dataset to create AjaxTabPanels
BuildDataSet();
// This is used to fetch the details from the database
// and creates the tabpanel for ajax tabconatiner
AddTabPanels();
Posted
Updated 10-Dec-18 1:49am
Comments
Vincent Maverick Durano 10-Dec-18 2:15am    
Show us your ASPX markup and your Button event handlers.
Member 8583441 10-Dec-18 7:21am    
i have sent my aspx markup page please tell me where i am doing wrong sir
Member 8583441 10-Dec-18 3:20am    
<asp:ScriptManager ID="ScriptManager1" runat="server">

Total Marks:
<asp:Label ID="LblTotalMarks" runat="server">
<asp:UpdatePanel ID="uplTimer" runat="server">
<contenttemplate>
<asp:Timer ID="TimerCountDown" runat="server" Interval="1000" ViewStateMode="Enabled" OnTick="TimerCountDown_Tick">
Time Left:  <asp:Label ID="LblTime" runat="server">


Subject:
<asp:Label ID="LblSubject" runat="server">

<cc1:TabContainer ID="SubjectCategoryTabs" runat="server" Visible="true" AutoPostBack="false" CssClass="fancy fancy-green">




<asp:Panel ID="pnlReviewAndNextBtn" runat="server">
<asp:UpdatePanel ID="up" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<contenttemplate>
<asp:Button ID="BtnReviewAndNext" runat="server" CausesValidation="false" Text="Review & Next" OnClick="BtnReviewAndNext_Click" />

<triggers>
<asp:AsyncPostBackTrigger ControlID="BtnReviewAndNext" EventName="Click" />







<asp:Panel ID="pnlSubmitBtn" runat="server">
<asp:UpdatePanel ID="up1" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
<contenttemplate>
<asp:Button ID="BtnSubmit" runat="server" Text="Submit" OnClick="BtnSubmit_Click" CausesValidation="false" />





<asp:HiddenField ID="hdnCount" runat="server" />
<asp:HiddenField ID="hdnTimerCountValue" runat="server" />


Code behind
Submit Button Event:
protected void BtnSubmit_Click(object sender, EventArgs e)
{
}
Review and Next Button
protected void BtnReviewAndNext_Click(object sender, EventArgs e)
{
}

1 solution

Here are my suggestions:

(1) Have you tried setting a break point at your Button Click events to see if it hits there?

(2) I'm not a fan of UpdatePanel control, but can you try removing the ChildrenAsTriggers="false" in your UpdatePanel control?
 
Share this answer
 
Comments
Member 8583441 10-Dec-18 8:48am    
first point, i have set break point for button click event that is why i mentioned button click event is not firing.
second point, my +5 vote to you sir because button click event is firing when i removed updatepanel completely but getting this error please give me suggestions sir.

Server Error in '/' Application.
Specified argument was out of the range of valid values.
Parameter name: value
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: value

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: value]
AjaxControlToolkit.TabContainer.set_ActiveTabIndex(Int32 value) +340
AjaxControlToolkit.TabContainer.LoadClientState(String clientState) +236
AjaxControlToolkit.ScriptControlBase.LoadPostData(String postDataKey, NameValueCollection postCollection) +176
AjaxControlToolkit.TabContainer.LoadPostData(String postDataKey, NameValueCollection postCollection) +105
AjaxControlToolkit.ScriptControlBase.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +69
System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +758
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1833


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3160.0
Vincent Maverick Durano 10-Dec-18 18:32pm    
Show us the relevant codes that causes this error. Which line in your code throws the error?

Also, I didn't ask you to remove the UpdatePanel completely. Just the ChildrenAsTriggers attribute.
Member 8583441 11-Dec-18 1:53am    
I have removed ChildrenAsTriggers attribute but no use
Vincent Maverick Durano 11-Dec-18 7:08am    
So which line the error occurred?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900