473,666 Members | 2,331 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem sending values from one page to another (pepehammer)

Hi guys, I'm using the following code to send values from one page to
another, but seems to me, that the event Page_Load in the receiving page
never fires.
Why?

This is the code:

Thanks

-*-*-*-*-*-*

PAGE SENDING THE INFORMATION
<%@ Page Language="vb" AutoEventWireup ="false" Codebehind="Pag eSend.aspx.vb"
Inherits="Testi ng.WebForm1" ClassName="clas sPageSend"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1 </title>
<meta content="Micros oft Visual Studio .NET 7.1" name="GENERATOR ">
<meta content="Visual Basic .NET 7.1" name="CODE_LANG UAGE">
<meta content="JavaSc ript" name="vs_defaul tClientScript">
<meta content="http://schemas.microso ft.com/intellisense/ie5"
name="vs_target Schema">
<!-- This is the script containig the logic to send -->
<!-- variable information from one page to another -->
<!-- THis is declared between the <HEAD> tag -->
<script language="vb" runat="server">

Public ReadOnly Property FirstName() as String
Get
Return txtFirstName.Te xt
End Get
End Property

Public ReadOnly Property LastName() as String
Get
Return txtLastName.Tex t
End Get
End Property

Sub ButtonClicked(s ender As Object, e As EventArgs )
Server.Transfer ("PageReceive.a spx")
End Sub

</script>
</HEAD>
<body MS_POSITIONING= "GridLayout ">
<form id="Form1" method="post" runat="server">
<asp:textbox id="txtFirstNam e" style="Z-INDEX: 101; LEFT: 72px; POSITION:
absolute; TOP: 72px"
runat="server"> </asp:textbox><as p:textbox id="txtLastName "
style="Z-INDEX: 102; LEFT: 72px; POSITION: absolute; TOP: 104px"
runat="server"> </asp:textbox><as p:button id="btnSend" style="Z-INDEX:
103; LEFT: 72px; POSITION: absolute; TOP: 144px" onclick="Button Clicked"
runat="server" Text="Send"></asp:button></form>
</body>
</HTML>

PAGE RECEIVING THE INFORMATION

<%@ Page Language="vb" AutoEventWireup ="false"
Codebehind="Pag eReceive.aspx.v b" Inherits="Testi ng.PageReceive" %>
<%@ Reference Page="PageSend. aspx"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>PageRece ive</title>
<meta content="Micros oft Visual Studio .NET 7.1" name="GENERATOR ">
<meta content="Visual Basic .NET 7.1" name="CODE_LANG UAGE">
<meta content="JavaSc ript" name="vs_defaul tClientScript">
<meta content="http://schemas.microso ft.com/intellisense/ie5"
name="vs_target Schema">

<script language="VB" runat="server">

Protected classPage as classPageSend

Sub Page_Load()

Response.Write( "Say this")

If Not IsPostBack then
classPage = CType(Context.H andler, classPageSend)
lblName.Text = "aaaa" 'classPage.Firs tName
Response.Write( "Say that")
End if

End Sub

</script>
</HEAD>
<body MS_POSITIONING= "GridLayout ">
<form id="Form1" method="post" runat="server">
<asp:label id="Label1" style="Z-INDEX: 101; LEFT: 24px; POSITION:
absolute; TOP: 40px" runat="server"> Shows the Values</asp:label>
<asp:Label id="lblName" style="Z-INDEX: 102; LEFT: 24px; POSITION:
absolute; TOP: 56px" runat="server"> </asp:Label></form>
</body>
</HTML>
Nov 18 '05 #1
2 1634
Cor
Hi Marcelo,

Paul had yesterday almost the same problem, I did send him this

You have to save your values or in "session" variables, but things like this
beter in a "viewstate" .

Have a look for that.

http://msdn.microsoft.com/library/de...sp11222001.asp

If you do not find it, message again.
(But not direct)

I hope this helps?

Cor
Nov 18 '05 #2
Have you tried to set the value of AutoEventWireup from "false" to
"true".

Frank

On Thu, 22 Jan 2004 00:59:49 -0500, "Marcelo" <pe********@hot mail.com>
wrote:
Hi guys, I'm using the following code to send values from one page to
another, but seems to me, that the event Page_Load in the receiving page
never fires.
Why?

This is the code:

Thanks

-*-*-*-*-*-*

PAGE SENDING THE INFORMATION
<%@ Page Language="vb" AutoEventWireup ="false" Codebehind="Pag eSend.aspx.vb"
Inherits="Test ing.WebForm1" ClassName="clas sPageSend"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1 </title>
<meta content="Micros oft Visual Studio .NET 7.1" name="GENERATOR ">
<meta content="Visual Basic .NET 7.1" name="CODE_LANG UAGE">
<meta content="JavaSc ript" name="vs_defaul tClientScript">
<meta content="http://schemas.microso ft.com/intellisense/ie5"
name="vs_targe tSchema">
<!-- This is the script containig the logic to send -->
<!-- variable information from one page to another -->
<!-- THis is declared between the <HEAD> tag -->
<script language="vb" runat="server">

Public ReadOnly Property FirstName() as String
Get
Return txtFirstName.Te xt
End Get
End Property

Public ReadOnly Property LastName() as String
Get
Return txtLastName.Tex t
End Get
End Property

Sub ButtonClicked(s ender As Object, e As EventArgs )
Server.Transfer ("PageReceive.a spx")
End Sub

</script>
</HEAD>
<body MS_POSITIONING= "GridLayout ">
<form id="Form1" method="post" runat="server">
<asp:textbox id="txtFirstNam e" style="Z-INDEX: 101; LEFT: 72px; POSITION:
absolute; TOP: 72px"
runat="server"> </asp:textbox><as p:textbox id="txtLastName "
style="Z-INDEX: 102; LEFT: 72px; POSITION: absolute; TOP: 104px"
runat="server"> </asp:textbox><as p:button id="btnSend" style="Z-INDEX:
103; LEFT: 72px; POSITION: absolute; TOP: 144px" onclick="Button Clicked"
runat="server" Text="Send"></asp:button></form>
</body>
</HTML>

PAGE RECEIVING THE INFORMATION

<%@ Page Language="vb" AutoEventWireup ="false"
Codebehind="Pa geReceive.aspx. vb" Inherits="Testi ng.PageReceive" %>
<%@ Reference Page="PageSend. aspx"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>PageRece ive</title>
<meta content="Micros oft Visual Studio .NET 7.1" name="GENERATOR ">
<meta content="Visual Basic .NET 7.1" name="CODE_LANG UAGE">
<meta content="JavaSc ript" name="vs_defaul tClientScript">
<meta content="http://schemas.microso ft.com/intellisense/ie5"
name="vs_targe tSchema">

<script language="VB" runat="server">

Protected classPage as classPageSend

Sub Page_Load()

Response.Write( "Say this")

If Not IsPostBack then
classPage = CType(Context.H andler, classPageSend)
lblName.Text = "aaaa" 'classPage.Firs tName
Response.Write( "Say that")
End if

End Sub

</script>
</HEAD>
<body MS_POSITIONING= "GridLayout ">
<form id="Form1" method="post" runat="server">
<asp:label id="Label1" style="Z-INDEX: 101; LEFT: 24px; POSITION:
absolute; TOP: 40px" runat="server"> Shows the Values</asp:label>
<asp:Label id="lblName" style="Z-INDEX: 102; LEFT: 24px; POSITION:
absolute; TOP: 56px" runat="server"> </asp:Label></form>
</body>
</HTML>


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
11869
by: Dan | last post by:
I was trying to troubleshoot a login page that doesn't work - it keeps saying the login/password is missing - when my tracing discovered this peculiar behavior. register_globals is off, so at the top of my script I assign a few variables to incoming GET and POST values. $login = clean($_POST, 30); $passwd = clean($_POST, 30);
13
23313
by: Mimi | last post by:
Hello, I am having trouble using the session vars in PHP 4.3.9 OS: Win XP Prof Web Server IIS (is local and there are no links to other servers from the web pages I work on) Browser: IE 6.0 The problem I am having is that each time I reload the same PHP page, I get
1
3786
by: Zaidan | last post by:
I am running Excel2000 under WIN98 2nd edition, and I am writing a VBA code (I will consider using javascript if I have to) that does the following, at the user command: 1- Start MS Explorer and go to my website. Login (enter ID and Password) 2- It will go and update some prices of some products that I sell 3- It will add new products or cancel some product I already have someone who wrote me in JavaScript a web form (no documentation...
11
6621
by: Abhishek | last post by:
I have a problem transfering files using sockets from pocket pc(.net compact c#) to desktop(not using .net just mfc and sockets 2 API). The socket communication is not a issue and I am able to transfer data across.On the serve I am using Socket 2 API (recv function to read bytes)and not using ..NET. I use FileStream to open the file on the pocket pc, then associate a BinaryReader object with the stream and call ReadBytes to read all the...
1
1636
by: Stephen Adam | last post by:
Hi there, I've just started a c# project at work where I cannot use Visual Studio. I am trying to pass variables from one form to another. When I try to create an instance of the sending class in the receiving class I get a "The type or namespace name 'XXXX' could not be found (are you missing a using directive or an assembly reference?)" Error. It seems that even though the sending class resides in the same folder as the receiving...
5
2414
by: vtreddy | last post by:
Hi All: In my application I am sending the input values through query string from a datagrid template column,I used URLEncode to encode the URL String, please find the input below, I am facing a problem when the input string contains ® character , Here from ASP.NET I am redirecting to the ASP based system,when I give same input from ASP based system, it is showing Microsoft%AE%20Access%20 ,with this I am getting the correct results, where as...
11
26845
by: Russ | last post by:
My web app writes some binary data to a file at the client site via Response.Write and Response.BinaryWrite. This action is accomplished in response to a button click, with C# code behind as follows: private void SubmitButton_Click (object sender, System.EventArgs e) { // Set up the response to write the print file to the client Response.Clear (); Response.AppendHeader ("Content-Disposition", "filename=WebPrint.prn");
2
1123
by: Marcelo | last post by:
Hi guys, I'm using the following code to send values from one page to another, but seems to me, that the event Page_Load in the receiving page never fires. Why? This is the code: Thanks -*-*-*-*-*-*
0
1081
by: uday | last post by:
hi all, i am getting problem on QuerySibling(...) method of PropertyPage please tell me, i am writing QuerySibling(...) method in PropertyPage named two and sending some Data to PropertyPage three where i am collecting the Data. But in first time the Page is not able to Transfer the Data to ThirdPage. here is the snippet of code. second page:
0
8443
marktang
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...
0
8356
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,...
0
8781
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8639
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7385
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6192
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2769
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
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1772
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.