单击gridview中的标签时的页面导航 [英] page navigation while clicking on a label in gridview
本文介绍了单击gridview中的标签时的页面导航的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的asp.net项目中,我显示了一个显示某些人的姓名和邮件的gridview。我的要求是,我想在点击他的同时导航到一个人的个人资料name.But我不能以链接的形式提供名称。没有提供如何导航的链接?请提供一些例子。
解决方案
你可以编写一个onclick方法,将window.location设置为你的url。
< asp:Label runat =serverID =lblnameText =ClickHereonclick =姓名()>< / asp:标签>
< script type =text / javascriptlanguage =javascript>
函数名称(){
调试器;
var name =;
}
< /脚本>
Hi,
In my asp.net project Iam displaying a gridview showing the name and mailid of some persons.My requirement is,I want to navigate to the profile of a person while clicking on his name.But I can''t provide the name in the form of a link.Without providing a link how the navigation is possible?Please suggest some examples.
解决方案
You can write an onclick method that sets the window.location to your url.
<asp:Label runat="server" ID="lblname" Text="ClickHere" onclick="Name()"></asp:Label>
<script type="text/javascript" language="javascript">
function Name() {
debugger;
var name = "";
}
</script>
这篇关于单击gridview中的标签时的页面导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文