单击LinkBut​​ton时,DataGrid ItemCommand事件无法正常工作 [英] DataGrid ItemCommand event not working when i click on LinkButton

查看:81
本文介绍了单击LinkBut​​ton时,DataGrid ItemCommand事件无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个DataGrid,其中一列是LinkBut​​ton。

当我点击链接按钮时,它会根据行选择导航到另一个页面。



为此我在ItemCommand事件中写了一个代码。

我的代码如下所示..

I have a DataGrid , in that one of the column is LinkButton.
When i click on the link button it''s navigate to another page based on row selection.

for this i wrote a code in ItemCommand event.
My code as like below..

string link = "link";
Response.Clear();
Response.Redirect(link);
Response.End();





这里我的问题是,当第一次点击链接按钮时导航到另一个页面但是当我点击第二次onwords这不起作用。



这有什么问题,如何解决这个问题....



Here what is my problem is when click on the link button on first time page is navigate to another page but when i''m click on second time onwords this is not working .

What''s the wrong in this , how to resolve this issue....

推荐答案

使用此链接我解决了我的问题



http://www.devcurry.com/2009/03/opening-new-window-from-code-behind- on.html [ ^ ]
Using this link i resolve my problem

http://www.devcurry.com/2009/03/opening-new-window-from-code-behind-on.html[^]


这篇关于单击LinkBut​​ton时,DataGrid ItemCommand事件无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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