将查询传递给asp.net中动态创建的linkbutton [英] pass query to dynamically created linkbutton in asp.net

查看:95
本文介绍了将查询传递给asp.net中动态创建的linkbutton的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想动态创建一个链接按钮,并将查询传递给该创建的链接按钮.在我的情况下,我检查数据库中的信息,如果信息可用,则动态创建链接按钮,并传递查询以检索信息.

我该如何进行...

谢谢u.

I want to create a link button dynamically and pass a query to that created link button. In my case i check the database for a information and if the information is available the link button is created dynamically and pass the query to retrieve the information.

How can i proceed...

Thanking u.

推荐答案

您的问题是,动态创建的控件没有视图状态,除非在回发时将它们添加到页面加载事件之前.
your issue is that dynamically created controls have no viewstate unless, on postback, they are added before the page load event.


这篇关于将查询传递给asp.net中动态创建的linkbutton的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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