N
Nancy.
Hello:
I have created an asp.net small app with an example from
visual studio .net.
Below is part of the code.
I am displays a select box. When selecting an item, It
should jumped to simplepage.aspx with a value rptdid.
The problem I am having is that the value is not passing
with it.
Could you please advice on what I am missing.
Thanks!
Main HTML
function jumpToPage(obj)
{ var url = obj.options[obj.selectedIndex].value; if
(url != "none") { parent.frames
["contentframe"].location = url; }
}
<select name="select" onchange="javascript:jumpToPage
(this)" class="DropDownMenu" ID="Select1">
<option value="simplepage.aspx?rptid=<%# "Test"%
//This is the SimplePage.apsx
<%@ Register TagPrefix="CrystalReports"
Namespace="CrystalDecisions.Web"
Assembly="CrystalDecisions.Web, Version=9.1.5000.0,
Culture=neutral, PublicKeyToken=692fbea5521e1304" %>
<@ Page Src="SimplePage.cs"
Inherits="CRSamples.SimplePage" %
<form method="POST" runat="server" > Test Reports
<CrystalReports:CrystalReportViewer
id="CrystalReportViewer1" runat="server" width="350px"
height="50px" pagetotreeratio="4" borderstyle="Dotted"
borderwidth="1px"/> </asp:button
\\This is the SimplePage.cs
using System;
using System.Web;
using Microsoft.Win32;
namespace CRSamples
{
public class SimplePage : System.Web.UI.Page
{
protected CrystalDecisions.Web.CrystalReportViewer
CrystalReportViewer1;
protected void Page_Init(object sender, EventArgs e)
{
Uri MyUrl = Request.Url;
string rptid=Request.Params.Get("rptid");
Response.Write(rptid);
}
}
}
I have created an asp.net small app with an example from
visual studio .net.
Below is part of the code.
I am displays a select box. When selecting an item, It
should jumped to simplepage.aspx with a value rptdid.
The problem I am having is that the value is not passing
with it.
Could you please advice on what I am missing.
Thanks!
Main HTML
function jumpToPage(obj)
{ var url = obj.options[obj.selectedIndex].value; if
(url != "none") { parent.frames
["contentframe"].location = url; }
}
<select name="select" onchange="javascript:jumpToPage
(this)" class="DropDownMenu" ID="Select1">
<option value="simplepage.aspx?rptid=<%# "Test"%
</select>">Report1</option>
//This is the SimplePage.apsx
<%@ Register TagPrefix="CrystalReports"
Namespace="CrystalDecisions.Web"
Assembly="CrystalDecisions.Web, Version=9.1.5000.0,
Culture=neutral, PublicKeyToken=692fbea5521e1304" %>
<@ Page Src="SimplePage.cs"
Inherits="CRSamples.SimplePage" %
<form method="POST" runat="server" > Test Reports
<CrystalReports:CrystalReportViewer
id="CrystalReportViewer1" runat="server" width="350px"
height="50px" pagetotreeratio="4" borderstyle="Dotted"
borderwidth="1px"/> </asp:button
\\This is the SimplePage.cs
using System;
using System.Web;
using Microsoft.Win32;
namespace CRSamples
{
public class SimplePage : System.Web.UI.Page
{
protected CrystalDecisions.Web.CrystalReportViewer
CrystalReportViewer1;
protected void Page_Init(object sender, EventArgs e)
{
Uri MyUrl = Request.Url;
string rptid=Request.Params.Get("rptid");
Response.Write(rptid);
}
}
}