打开一个新的窗口,然后向它传递参数vb.net ASP [英] Open a new window and pass parameters to it vb.net asp

查看:605
本文介绍了打开一个新的窗口,然后向它传递参数vb.net ASP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我有其中有针对特定用户的所有可用报表的列表框的Web应用程序。我要翻开新的一页ReportViewerPane单击某一行的时候,并通过该报告的名称,并通过与reportviewer.aspx那么我需要设置的ReportViewer控制一些参数.reportpath正确的(穿过)值,并把参数值(也穿过)。

Hi I have a web app which has a listbox of all the available reports for a particular user. I want to open a new page 'ReportViewerPane' when a row is clicked and pass the report name and some parameters through to the reportviewer.aspx I then need to set the ReportViewer controls .reportpath to the correct (passed through) value and set the parameters values (also passed through).

我的那一刻我有这样的父页面。 PassParmString是主窗体上一个文本框:

I the moment I have this in the parent page. 'PassParmString' is a textbox on the main form:

function open_win()
{
   var Parms = document.getElementById('<%=PassParmString.ClientID %>');
   window.open("ViewerPane.aspx?prm=" + Parms,"_blank","left=20,top=20,width=1000,height=1140,toolbar=0,resizable=1");
}
</script>

但不知道如何访问参数'PARMS',我曾经通过我在ReportViewer.aspx形式。

but have no idea how to access the parameter 'Parms' that I pass once I am in in the ReportViewer.aspx form.

请帮忙。

我不擅长这个。而真正想了解的职位,请耐心等待。

I'm not good at this. And really trying to understand the posts so please be patient.

非常感谢

苹果

推荐答案

您可以用在你的 ViewerPane.aspx 页经常请求的查询字符串收集得到它

you can get it using regular request querystring collection in your ViewerPane.aspx page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) 
    If NOT IsPostBack
        If Not String.IsNullOrEmpty(Request.QueryString("prm"))
           string querystringvalue = Request.QueryString("prm").ToString()
        End If
    End If
End Sub

试着改变你的JavaScript这种

try changing your javascript to this

<script>
function open_win()
{
   var Parms = document.getElementById('<%=PassParmString.ClientID %>');
   window.open("ViewerPane.aspx?prm=" + Parms.value,"_blank","left=20,top=20,width=1000,height=1140,toolbar=0,resizable=1");
}
</script>

请参阅如果这能帮助:)

See if this helps :)

这篇关于打开一个新的窗口,然后向它传递参数vb.net ASP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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