事件单击以在gridview中标记a [英] event click for tag a in gridview

查看:56
本文介绍了事件单击以在gridview中标记a的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在cell [1]的RowDataBound中有一个gridview,我显示:
点击我
我定义:


i have a gridview in RowDataBound in cell[1] i show:
click me
and i define:

protected void btnShowData(object sender, EventArgs e)
    {
        lblmessage.Text = "hello worla";
    }


但是在运行时,当我单击单击我"时,我收到以下消息:


but in run time when i click on "click me" i get this message:

Microsoft JScript runtime error: ''btnShowData'' is undefined


请帮助我,如何通过onclick事件使用"a"标签?

谢谢.


plz help me ,how can i use "a" tag by onclick event?

thanks.

推荐答案

不确定问题描述中为什么有相同问题的链接.

您应该学习Asp.Net GridView的" TemplateColumn ".

看看下面的文章.

http://msdn.microsoft.com/en-us/magazine/cc301573.aspx

一旦了解了该概念,便可以通过多种方式自定义Asp.Net GridView.
Not sure why you have link of same question in your Question-Description.

You should learn "TemplateColumn" of Asp.Net GridView.

Have a look at below Article.

http://msdn.microsoft.com/en-us/magazine/cc301573.aspx

Once you understand the concept, then you will be able to customize your Asp.Net GridView in many ways.


同意RaisKazi.

试试这些

如何在asp的gridview中触发LinkBut​​ton的onClick事件.使用c# [ ^ ]
带有确认的GridView删除 [在GridView控件中使用TemplateFields [ ^ ]
Agree with RaisKazi.

Try these

How to fire onClick event of LinkButton inside gridview in asp.net using c#[^]
GridView Delete, with Confirmation[^]

For your information
Using TemplateFields in the GridView Control[^]


这篇关于事件单击以在gridview中标记a的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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