Unusual problem where form parameters are not being passed to a .NET form


I am using Visual Studio 2005 on Windows 2003 (64 bit) and have a very unusual problem and would appreciate any help.

Requirement - The Web application is part legacy part ASP part .NET. I have a requirement to show a Cyrstal PDF report in a new browser window. To do this I load and auto submit an ASP form which submits to a .NET form that opens in a new window. The .NET form generates the Crystal PDF file and response.redirects to display the report in the new window.

Problem - On my development manchine (which hosts the web server) the application works as planned. However, if you access the web server from a separate machine. On the first page load it works. If you then refresh the calling page, the form parameters are NOT passed into the .NET form and the .NET form fails. Reload again - it works, Reload - it fails ...

It is possible to create a simple application to demonstrate the problem:

1) Create an asp page called Default.asp. This submits the form with one parameter param having a value of hello. When submitted it involves the page /DoPage.aspx in a new browser window.

<html><head><title>Error found while generating report</title></head>

<body onload="dopages ();">

<script language="javascript">

function dopages ()





<p>Page 1 the entry page DEFAULT.ASP</p>

<form action="/DoPage.aspx" name="xfer" method="post" target="Report">

<input type="hidden" name="Param" value="hello" ID="Hidden2">



2) Create a new .NET web form call DoPage.aspx This only invokes the code behind.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="DoPage.aspx.vb" Inherits="DoPage" %>

3) Code behind DoPage.aspx.vb This checks the value of param if it is hello it performs a response.redirect to a PDF file called b.pdf. If the param is anything else it reports the value of the parameter.

Partial Class DoPage

Inherits System.Web.UI.Page

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

If Request.Form("param") <> "hello" Then

Response.Write("<HTML><HEAD><TITLE>A Page</TITLE></HEAD>")


Response.Write("<P>Value of parameter was not that expected. param was: '" & Request.Form("param") & "'</P>")





End If

End Sub

End Class

3) Copy a pdf file into the same directory as the application and rename it to b.pdfB

4) To reproduce the error:

- Open  IEE on a machine other than that hosting the web server and type http://webserver/default.asp

- This opens one window containing the text Page 1 the entry page DEFAULT.ASP and a second window showing the PDF file.

- Click reload on the first window. This reloads both the first and second browser windows but the second window now shows Value of parameter was not that expected. param was: ''

- Cick reload on the first window. This reloads the first and second browswer windows. The second window now shows the PDF file.


2/9/2006 12:41:44 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 14
Get it on Google Play
Get it on Apple App Store


Similar Artilces:

Implementing .Net Form into an APS.net web form, can this be done
I am new here, but have been searching for a while, and may not have the correct lingo to find what I am looking for.  I am tasked with implementing a .exe application that was writen vb6 then converted to .net into a new website my team is developing. The idea is to put each of the 3 different forms in this .exe application of 3 different .aspx pages. I have attempted multiple things to get this into the page and even started to just rewrite it as an ASP.net web form, but even then I can't reuse any of the code since the System.Web.UI.Page doesn't inherit the sa...

windows forms in vb .net into web forms
we are creating a database driven website as part of our project. currently we have forms connecting to the database created in visual basic. these windows forms we need to convert into web forms which are asp .net compatible. can u give me an answer or show me a way. Hi, because of the difference in nature between web and win applications you'll need to reimplement at least the UI part. If you have a multitiered application in which the busines logic and data access are in different parts/assemblies you can reuse them. Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Wor...

non .net form issue within a .net form tag
this may be a bad question... but I am adding a shopping cart to my asp.net website and it calls for the following code for the 'buy now' buttons: <form method="POST" action=http://www.cart.net/cart.aspx/CartName><input type="hidden" name="ID" value="IDName"><input type="hidden" name="Describe" value="IDName Description"><input type="hidden" name="Price" value="100.00"><input type="hidden" name="QtyMax" value="1"><input t...

Passing parameters from web form to windows modal form
Dear All, How can I pass a parameter from an ASP.NET web form (.aspx) to a windows popup modal form? I have a web form that show a list of items in a data grid, when user click on one of the item in the list, the item details is retrieve from database and show on the popup modal form. To retrieve the item details from the database in the modal form, the item ID need to pass to the modal form. How can I do it? Please help. Thanks in advance. Do you mean with windows modal form literally winform or just popup (web page) which is modal? You can open modal web pages using window.showModa...

Forms or No Forms
Hope this isn't a repeat.  I looked and didn't find anything. Say for example you had a web page with around 20 fields retrive and update to a database with differing datatypes.  Some fields will have some special controls (dropdowns, radios, buttons, etc) that interact with other parts of the page.  What is the best and/or most efficient code to make the page. Would you use a Formview bound to a standard ADO.net SQL connection and edit the templates. Use a Formview bound to an Object Data Source and edit within the templates. Or use an Object Data Source and bind the...

Passing Values from a Web Form to Another Web Form
Hello All! I am trying to pass values from one web form to another web form. I know that there are 3 ways of doing this: queryString, Server.Transfer and Session. I am using the Server.Transfer method. But I am not able to create, in my 2nd web form, an instance of my 1st web form. My 1st Web form is named CallTrack.aspx and my 2nd is named Export.aspx. What I mean is something like this: Public value as CallTrack. I can't create it in my 2nd web form because when the intellisense is displayed, there's no CallTrack in the options. Thanks!   How about using cross-...

how to place a <form> in web form form
i placed a <form> in the web form, but i can't submit coz i neet to submit to another web site how can i do??? Mike Chan You cannot submit a <form> to another page if you have a RunAt="Server" in the form tag. Remove that RunAt="Server" and you can (though then you will need to use plain old HTML inside that form). What are you trying to do? Why do you need to post to another form?Starting with ASP.NET 2.0? Look at:Programming Microsoft Web Forms My Blog COZ I NEED TO POST SOME INFORMATION TO ANOTHER WEB SITE IS THERE ANY OTHER SOLUTION?M...

How to Make Web Forms from other Web Forms
In putting together an ASP.NET application for a biz application, we have come to the point where there are three different types of basic forms which have, for the most part, been perfected. Now its is a matter of cloning those forms for various uses and modifying or adding code to suit the particular need. Copy and paste works OK, but there is a lot of changing of certain words, etc. Is there a way in ASP.NET to take these basic forms, turn them into classes or templates, create forms from them, then add or overwrite code? ? (Anybody who is a Vis Fox Pro programmer would know imme...

Web forms and mobile web forms
Hey everyone, I am looking to develope a web site that depending on the device connecting to it, it will display a certain page. In this case im looking to create a web and wap version of the same project. I have the Web forms version finished using ASP.NET and C# and I am wondering how to create the mobile web form and incorporate it in the project. In the project folder, can I just add a mobile web??? But what about displaying device specific pages?? Cheers -Dudach Yes, you can add mobile web forms and controls to your Web Application project. No problem. For device/br...

invoke mail form of outlook express form web form
how do i invoke a mail form from a web page email link. i have to invoke the outlook express mail form to send a mail to the email id of the person email link on my web page. Hi, It's just simple. Please give a hyperlink to that mailid as show below with the mailto: <a href='mailto:test@testing.com'>Click here to send mail</a> Thanks & Regards, Sriram.K...

Caputre the value of parameter passes from a Form to other Form
I´m trying to capture the value of parameters that it comes from a form. I´m using the command Request.QueryString, but I´m having problems... It´s happenning an error: 'System.Web.HttpRequest.QueryString' denotes a 'property' where a 'method' was expected What am I missing ???  Well, on the first form, I´ve an hyperlink that calls another form passing a parameter.  URL field:  CODIGO     URL format string:  Projeto.aspx?id={0} And I´m trying to capture this value and put it into a comand´s parameter :  this.sqlSelectCommand1.Parameters["@T...

Access forms vs vb.net forms
I have to do an windows application for an access database, which currently had access forms. I am trying to convince doing it in vb.net. I know I can do much better froms or front end with VB.net. I am not sure how to convince my boss or client. Thanks If you want info on Windows Applications try www.windowsforms.net. Here's how to convince them, if they are tight about money: vb.net = Only need one license, for you the programmer, which you may already have access = need an access license for every person that uses the program (shush, don't tell them about access runtime) I...

passing values to .net web form application
Hi Can any explain me abt how to pass values to my .NET web form application (designed using PB 11.1) from other web application? My intension is to redirect from a web application (ASP.NET to .net web form application) to my web application with user information. Thanks & Regards, Anbazhagan From the "Deploying Applications and Components to .NET" manual: >>> Starting an application with command line parameters If your application requires command line parameters, you can assign values to the PBCommandParm global property before you deploy the...

Problems with the .NET 2005 web form designer
In Visual Studio.NET 2003, building a web page was very similar to building a plain old form. In 2005, everything's changed. Every control gets shifted to the top left, I have to use panels and so on to separate things, and if I have to change something later it's an absolute nightmare. Am I really stuck with this, or is there some switch somewhere that will allow me to do things the way I'm used to?   Geoffrey Callaghan Try this.  Bring up an aspx page in design (not source) mode.  This will enable the Layout menu. Goto Layout->Position->Auto-Pos...

Web resources about - Unusual problem where form parameters are not being passed to a .NET form - asp.net.web-forms

Parameter - Wikipedia, the free encyclopedia
A parameter (from the Ancient Greek παρά , "para", meaning "beside, subsidiary" and μέτρον , "metron", meaning "measure"), in its common meaning, ...

fb_source Parameter - Facebook-Entwickler
This document lists the complete list of values for the fb_source parameter that is returned with th...

Google / Firefox Parameter - Flickr - Photo Sharing!
HS what? www.seroundtable.com/archives/017105.html

Cat 8: TIA performance standards committee chairman previews parameters of forthcoming twisted-pair cable ...
Category 8, the next-generation twisted-pair cabling specification, is still in development, but the outlook looks quite positive that it will ...

Philippine president asks for 'parameters' of Mayon Volcano tours
Philippine president asks for 'parameters' of Mayon Volcano tours People's Daily Online ... 26, 27, 28, 29, 30, 31. Jan, Feb, Mar, Apr, May, ...

Alternatives to boolean parameters
... ) { PrintLine ( item . Name ); if ( printDetails ) { PrintLine ( item . Description ); } } } Aha! Now can see that the boolean parameter ...

Exporting Error (Error in Parameter...: Apple Support Communities
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability ...

Apple tech monitors device aging, adjusts operating parameters to ensure optimal performance
... describing a method of monitoring the aging of a device's electronics, comparing the data with a global average and modifying operating parameters ...

Is it poor programming practice to pass parameters as objects?
... a free, community-powered network of 100+ Q&A sites . Risser asked: So, we've got a guy who likes to write methods that take Objects as parameters, ...

Parameter Short Film Competition sponsored by Grolsch
Grolsch presents Parameter The A.V. Club Short Film Competition Please Enter Your Date of Birth Ineligible entry Enter For people over the age ...

Resources last updated: 1/2/2016 2:42:32 AM