Request.Param not returning a value

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"%
">Report1</option>
</select>


//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);
}
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top