错误的解决方案无法将'System.Web.UI.WebControls.GridView'类型的对象强制转换为'System.Web.UI.WebControls.LinkBut​​ton'。在asp.net中 [英] solution of error Unable to cast object of type 'System.Web.UI.WebControls.GridView' to type 'System.Web.UI.WebControls.LinkButton'. in asp.net

查看:57
本文介绍了错误的解决方案无法将'System.Web.UI.WebControls.GridView'类型的对象强制转换为'System.Web.UI.WebControls.LinkBut​​ton'。在asp.net中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我点击下一页时,出现了有问题的错误..

plz建议我为什么在GridView1_RowCommand事件上发生此错误..

when I click on next page, error specified in question is occured..
plz suggest me why this error is occured on GridView1_RowCommand event..

推荐答案

因为您在 GridView1_RowCommand 中编写了错误的代码(并且您没有向我们展示该代码,因此我们无法将您指向特定的行!)。 />
A GridView 不是 LinkBut​​ton ,也不是 LinkBut​​ton 继承自 GridView ,因此无法进行强制转换。
Because you wrote wrong code in GridView1_RowCommand (and you did not show us that code, hence we cannot point you to the specific line!).
A GridView is not a LinkButton, nor does LinkButton inherit from GridView, consequently that cast is not possible.


这篇关于错误的解决方案无法将'System.Web.UI.WebControls.GridView'类型的对象强制转换为'System.Web.UI.WebControls.LinkBut​​ton'。在asp.net中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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