我想从gridview获得一个链接,该链接将搜索报告页面 [英] i want to have a link from a gridview that will search a report page

查看:64
本文介绍了我想从gridview获得一个链接,该链接将搜索报告页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮我吗,我想从asp.net上的gridview中搜索并将其显示在报告页面上

我在gridview中有一个视图链接,因此,当页面运行时,用户必须能够单击该链接(视图),这样报表页面才会弹出该特定信息.

请帮助我...请不要粗鲁

Can someone help me I want to search from gridview on a asp.net and display it on a report page

i have a view link in my gridview, so when the page is running the user must be able to click that link(View) than the report page will pop-up with that certain info.

please help me guys... please dont be rude

推荐答案

使用rowcommand事件进行网格视图和gridview中的linkbutton给出
commandname ="view"
然后

在rowcommand事件中编写此代码
< pre>
如果(e.CommandName =="view")
{
字符串pageurl ="reports.aspx" + e.CommandArgument.ToString();
Page.ClientScript.RegisterStartupScript(this.GetType(),"aa",<脚本语言=''javascript''> view(""+ pageurl +"'');</script>));

}

</pre>< pre>
函数视图(URL)
{
//var loc = window.location;
window.open(URL,``pop_window'',``toolbar = no,menubar = no,location = no,scrollbars = yes,height = 300,width = 450,left = 200,top = 200'');
//var popupStyle ="dialogheight = 300px; dialogwidth = 450px; dialogleft:200px; dialogtop:200px; status:no; help:no;";
//var var1 = window.showModalDialog(url,this,``'',popupStyle);

}
</pre>


/////////
这是C#代码,请不要介意
use rowcommand event for grid view and for linkbutton in gridview give
commandname="view"
then

in rowcommand event write this code
<pre>
if (e.CommandName == "view")
{
string pageurl = "reports.aspx" + e.CommandArgument.ToString();
Page.ClientScript.RegisterStartupScript(this.GetType(), "aa", "<script language=''javascript''>view(''" + pageurl + "'');</script>");

}

</pre><pre>
function view(url)
{
//var loc = window.location;
window.open(url, ''pop_window'', ''toolbar=no,menubar=no,location=no,scrollbars=yes,height=300,width=450,left=200,top=200'');
// var popupStyle = "dialogheight=300px;dialogwidth=450px;dialogleft:200px;dialogtop:200px;status:no;help:no;";
// var var1 = window.showModalDialog(url,this, '''', popupStyle);

}
</pre>


/////////
this is c# code plz dont mind


这篇关于我想从gridview获得一个链接,该链接将搜索报告页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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