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="PageSend.aspx.vb"
Inherits="Testing.WebForm1" ClassName="classPageSend"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<!-- 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.Text
End Get
End Property
Public ReadOnly Property LastName() as String
Get
Return txtLastName.Text
End Get
End Property
Sub ButtonClicked(sender As Object, e As EventArgs )
Server.Transfer("PageReceive.aspx")
End Sub
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:textbox id="txtFirstName" style="Z-INDEX: 101; LEFT: 72px; POSITION:
absolute; TOP: 72px"
runat="server"></asp:textbox><asp:textbox id="txtLastName"
style="Z-INDEX: 102; LEFT: 72px; POSITION: absolute; TOP: 104px"
runat="server"></asp:textbox><asp:button id="btnSend" style="Z-INDEX:
103; LEFT: 72px; POSITION: absolute; TOP: 144px" onclick="ButtonClicked"
runat="server" Text="Send"></asp:button></form>
</body>
</HTML>
PAGE RECEIVING THE INFORMATION
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="PageReceive.aspx.vb" Inherits="Testing.PageReceive" %>
<%@ Reference Page="PageSend.aspx"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>PageReceive</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<script language="VB" runat="server">
Protected classPage as classPageSend
Sub Page_Load()
Response.Write("Say this")
If Not IsPostBack then
classPage = CType(Context.Handler, classPageSend)
lblName.Text = "aaaa" 'classPage.FirstName
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> 2 1621
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
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********@hotmail.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="PageSend.aspx.vb" Inherits="Testing.WebForm1" ClassName="classPageSend"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <title>WebForm1</title> <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR"> <meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE"> <meta content="JavaScript" name="vs_defaultClientScript"> <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema"> <!-- 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.Text End Get End Property
Public ReadOnly Property LastName() as String Get Return txtLastName.Text End Get End Property
Sub ButtonClicked(sender As Object, e As EventArgs ) Server.Transfer("PageReceive.aspx") End Sub
</script> </HEAD> <body MS_POSITIONING="GridLayout"> <form id="Form1" method="post" runat="server"> <asp:textbox id="txtFirstName" style="Z-INDEX: 101; LEFT: 72px; POSITION: absolute; TOP: 72px" runat="server"></asp:textbox><asp:textbox id="txtLastName" style="Z-INDEX: 102; LEFT: 72px; POSITION: absolute; TOP: 104px" runat="server"></asp:textbox><asp:button id="btnSend" style="Z-INDEX: 103; LEFT: 72px; POSITION: absolute; TOP: 144px" onclick="ButtonClicked" runat="server" Text="Send"></asp:button></form> </body> </HTML> PAGE RECEIVING THE INFORMATION
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="PageReceive.aspx.vb" Inherits="Testing.PageReceive" %> <%@ Reference Page="PageSend.aspx"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <title>PageReceive</title> <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR"> <meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE"> <meta content="JavaScript" name="vs_defaultClientScript"> <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<script language="VB" runat="server">
Protected classPage as classPageSend
Sub Page_Load()
Response.Write("Say this")
If Not IsPostBack then classPage = CType(Context.Handler, classPageSend) lblName.Text = "aaaa" 'classPage.FirstName 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> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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
...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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
...
|
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...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
| |