如何通过单击链接按钮在gridview中设置状态(活动,非活动) [英] how to set the status(Active,inactive) in gridview by clicking the link button

查看:95
本文介绍了如何通过单击链接按钮在gridview中设置状态(活动,非活动)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在我的项目中,我有一个gridview列(名称,地址,国家,状态和一个链接按钮),如果我点击该链接按钮,状态应该更改为(活动(或) )不活动)

而当状态处于活动状态时单击链接按钮意味着它应该被更改为非活动状态,就像那个从不活跃到活动状态的那样。如果这样做,请帮助我。如果可行的话告诉我们一步一步地在begginer级别


in my project i have one gridview columns(Name,Address,Country,Status and one link button )if i click that link button the status should be changed like(active(or)inactive)
while the link button is clicked at the time the status is active means then it should be changed to inactive like that wiseversa inactive to active.how to do this plz help me.if posible plz tell step by step im in begginer level

推荐答案

为什么不将链接按钮发回到同一页面但是有一些查询字符串。在页面加载检查查询字符串是否存在然后切换活动状态。如果它不存在,只需按原样显示数据。
Why not have the link button post back to the same page but with some query string. On the page load check if the query string is present then toggle the active status. if it is not present simply present the data as is.


这篇关于如何通过单击链接按钮在gridview中设置状态(活动,非活动)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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