当从数据库绑定完整的ASP.NET页面时,Asp.net按钮不会触发 [英] Asp.net buttons are not firing when full ASP.NET page binded from database

查看:71
本文介绍了当从数据库绑定完整的ASP.NET页面时,Asp.net按钮不会触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Ajax tabcontainer和repeater来绑定数据以及其他一些字段,例如会话值。一切正常,但是当点击按钮时,无论是asp.net按钮还是HTML按钮或链接按钮或图像按钮或任何其他可用按钮,我都尝试了该绑定页面中的所有按钮。这些按钮根本没有触发,请有人帮我解决这个问题。



我尝试了什么:



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();

推荐答案

以下是我的建议:



(1)您是否尝试在Button Click事件中设置断点以查看是否它命中了吗?



(2)我不是UpdatePanel控件的粉丝,但是你可以尝试删除 ChildrenAsTriggers =false您的UpdatePanel控件中有


这篇关于当从数据库绑定完整的ASP.NET页面时,Asp.net按钮不会触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆