Hi!
This is my problem:
I want to go from page1 to page2,
and to get all the form variables from page1
to page2.
I have turned the viewstate and the sessionstate off,
and i really just want to get these variables the
oldfashioned way (ie via the request.form collection)
This is how im trying to do this:
I have a javascript that fires on page1 that
changes the action of its form to page2 and then submits
the page.
//page1 javascript
function test()
{
Form1.target="_ blank";
Form1.action="p age2.aspx";
Form1.submit();
}
but when i get to page2, the form collection
from page1 is gone...
+ the request object says i used method=GET...
can someone help me out here plz 5 4327
If you are using standard html controls in that form, you can remove the
runat=server attribute to treat it as an old-fashioned, "classic" form. Then
set the action attribute to your new form.
--
James J. Foster, DotNetCoders http://www.dotnetcoders.com
"Magnus" <ho*******@hotm ail.com> wrote in message
news:0b******** *************** *****@phx.gbl.. . Hi!
This is my problem:
I want to go from page1 to page2, and to get all the form variables from page1 to page2.
I have turned the viewstate and the sessionstate off, and i really just want to get these variables the oldfashioned way (ie via the request.form collection)
This is how im trying to do this: I have a javascript that fires on page1 that changes the action of its form to page2 and then submits the page. //page1 javascript function test() { Form1.target="_ blank"; Form1.action="p age2.aspx"; Form1.submit(); }
but when i get to page2, the form collection from page1 is gone... + the request object says i used method=GET...
can someone help me out here plz
Make sure your form tag has method=post in it.
Also, for future reference, in page1, you could always use
Server.Transfer ( "page2.aspx ").
hth,
Dave www.aspNetEmail.com
"Magnus" <ho*******@hotm ail.com> wrote in message
news:0b******** *************** *****@phx.gbl.. . Hi!
This is my problem:
I want to go from page1 to page2, and to get all the form variables from page1 to page2.
I have turned the viewstate and the sessionstate off, and i really just want to get these variables the oldfashioned way (ie via the request.form collection)
This is how im trying to do this: I have a javascript that fires on page1 that changes the action of its form to page2 and then submits the page. //page1 javascript function test() { Form1.target="_ blank"; Form1.action="p age2.aspx"; Form1.submit(); }
but when i get to page2, the form collection from page1 is gone... + the request object says i used method=GET...
can someone help me out here plz
There are a couple of ways to do this. For a form post, switch the form in
question back to a standard HTML form and then pull from the request
collection. It is also possible to transfer on the server and use viewstate
to pull data (and better in a truly .NET enable environ).
In your example, you would be best to either make the paradigm shift to .NET
(ie, form and handler in same page (can be done rather easily with
containers like panels)) or switch the form to a client side standard HTML
form and pull from request.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Author: ADO.NET and XML: ASP.NET on the Edge
*************** *************** *************** *************** *************** *
****
Think Outside the Box!
*************** *************** *************** *************** *************** *
****
"Magnus" <ho*******@hotm ail.com> wrote in message
news:0b******** *************** *****@phx.gbl.. . Hi!
This is my problem:
I want to go from page1 to page2, and to get all the form variables from page1 to page2.
I have turned the viewstate and the sessionstate off, and i really just want to get these variables the oldfashioned way (ie via the request.form collection)
This is how im trying to do this: I have a javascript that fires on page1 that changes the action of its form to page2 and then submits the page. //page1 javascript function test() { Form1.target="_ blank"; Form1.action="p age2.aspx"; Form1.submit(); }
but when i get to page2, the form collection from page1 is gone... + the request object says i used method=GET...
can someone help me out here plz
thanx, but, my problem is more complex than that.
check this out:
page1
|_| -> A couple of buttons, that do the ordinary
postback .net stuf
->but for one button I want the user to stay on the
current page +send the form information to a separate page
in another browser window.
ie its not just a question of processing the data in
another webform, but keep the old form alive,
and get another one started.
Page2 is an excel presentation of the data in page1,
and i want the user to be able to look att both
at the same time.
the first way (standard HTML form)
sounds like a lot of hassle as I have a table
that i build dynamically, containing a couple of
servercontrols
It might be possible, but surely
there must be a simpler way to make page2 treat the request
as a post request and not drop the form variables? -----Original Message----- There are a couple of ways to do this. For a form post,
switch the form inquestion back to a standard HTML form and then pull from
the requestcollection. It is also possible to transfer on the server
and use viewstateto pull data (and better in a truly .NET enable environ).
In your example, you would be best to either make the
paradigm shift to .NET(ie, form and handler in same page (can be done rather
easily withcontainers like panels)) or switch the form to a client
side standard HTMLform and pull from request.
-- Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA Author: ADO.NET and XML: ASP.NET on the Edge
************** *************** *************** **************
*************** ******* Think Outside the Box! ************** *************** *************** **************
*************** ******* "Magnus" <ho*******@hotm ail.com> wrote in message news:0b******* *************** ******@phx.gbl. .. Hi!
This is my problem:
I want to go from page1 to page2, and to get all the form variables from page1 to page2.
I have turned the viewstate and the sessionstate off, and i really just want to get these variables the oldfashioned way (ie via the request.form collection)
This is how im trying to do this: I have a javascript that fires on page1 that changes the action of its form to page2 and then submits the page. //page1 javascript function test() { Form1.target="_ blank"; Form1.action="p age2.aspx"; Form1.submit(); }
but when i get to page2, the form collection from page1 is gone... + the request object says i used method=GET...
can someone help me out here plz
.
Hi,
Use the Form target attribute :
<form target="_blank" id="WebForm2" action="WebForm 3.aspx"
method="post">
<INPUT name = "a" style="Z-INDEX: 101; LEFT: 121px; WIDTH: 182px;
POSITION: absolute; TOP: 83px; HEIGHT: 31px" type="text" size="25">
<INPUT name = "b" style="Z-INDEX: 102; LEFT: 126px; WIDTH: 171px;
POSITION: absolute; TOP: 135px; HEIGHT: 33px" type="text" size="23">
<INPUT style="Z-INDEX: 103; LEFT: 166px; WIDTH: 88px; POSITION:
absolute; TOP: 216px; HEIGHT: 38px" type="submit" value="Submit">
</form>
Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114
Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377
Know the overall picture
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: HANG LAM |
last post by:
Hi,
Simple question, Is there a way to post the data from one .aspx page
to another page ?
For example, I have a Page1.aspx that lets the user enter data like
"Last Name", "First Name", but I want post that information into another
..aspx page (Page2.aspx ) .
I know I can do a redirect to the second page ,but then I will have to
|
by: anon |
last post by:
Post Forwarding question......
For this control below,
<asp:Button runat="server" PostTargetUrl="page2.aspx" />
The Attribute: PostTargetUrl="page2.aspx"
Is this PostTargetUrl Attribute going to be available in the <a> and Html
Controls as well as opposed to just the <asp:Button> control?
|
by: DaveFash |
last post by:
Posting variables from an HTML FORM, via
the Request.Form function on the receiving
ASP page is great.
But how can you POST a Form variable to
an ASP page -- without a human pushing a
Submit button?
An ASP page that can decide when to POST
and send the Form vaiables, but out without a
|
by: buran |
last post by:
Dear ASP.NET Programmers,
How can I post data to an ASP.NET login page and pass authentication? The
login page uses forms
authentication, users must supply usernames and password and have to click
on a submit button. I
want to automate this process by supplying values with HttpWebRequest and
then download a file on
the site. I think that I cannot invoke the submit button. Pleeeasee help,
thanks in advance
|
by: Raja Balaji R |
last post by:
hi
I have a page1.aspx which accepts Username, Password which
is posted to page2.aspx using a submit button, i want
page2.aspx to submit, transfer or redirect the same posted
information which was received from page1.aspx to
page3.aspx and page3.aspx does the processing.
how to transfer, redirect with same posted information.
| |
by: Rob Shorney |
last post by:
Hi,
We currently have a classic asp web application.
We are currently looking at upgrading this to ASP.NET.
However I have a couple of problems that need to be resolved.
1. aspx forms always post back to themselves. how do I get it to post to
another web page.
|
by: Andrew |
last post by:
Hello, friends,
I tried to do cross-page posting, i.e., in firstpage.aspx I used
action="secondpage.aspx".
Since I am using asp.net 1.1, so it always goes back to firstpage.aspx
aftern submitting firstpage.aspx.
I then tried in page_load of firstpage.aspx:
|
by: Peter2 |
last post by:
Hi,
I have a problem posting non-ASCII characters in FORM fields between classic
ASP and ASP.NET. I use a fully patched Windows 2000 Advanced Server with .net
2.0 and visual Studio 2005 installed, IIS, IE6 etc ...
When an *.ASPX page receives the post, it drops non-ASCII characters, for
example it drops character é from word Montréal. Specifying explicit encoding
on ASP/ASPX page doesn't help. The encoding works without doing anything...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |