如何在数据列表控件中使用链接按钮单击事件 [英] how to use link button click event inside datalist control

查看:131
本文介绍了如何在数据列表控件中使用链接按钮单击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用DataList控件.使用数据列表,我显示来自SQL Server数据库表的数据.例如,使用 Eval 我以这种方式绑定所有数据.它工作正常.但是我不想这样绑定所有数据.我想使用数据列表中的链接按钮.我的目的是当我单击链接按钮时,它应该显示并将数据绑定到链接按钮,并显示为链接按钮的文本.
我的问题是我已经将数据绑定到数据列表,但是还没有将数据绑定到链接按钮.在显示包含其他数据的数据列表后,我想单击链接按钮并在链接按钮中将所有数据(包括数据)显示为文本.

只需单击链接按钮ViewPhoneNumbers

I am using DataList Control. using datalist i display data from sql server database table. for example using Eval i bind all data this way. it is working all right. But i don''t want to bind all the data this way. I want to use link button inside datalist. My purpose is when I click on link button it should display and bind data to link button and display as a text of link button.
My problem is i have already bind data to data list but not bind data to link button. after i display datalist with other data i want to click link button and display all data including data as a text in link button.

any one can see the same thing in the search item list on www.tatayellopages.com just clicking the link button ViewPhoneNumbers

推荐答案


这篇关于如何在数据列表控件中使用链接按钮单击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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