473,399 Members | 3,302 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

server.transfer

Dan
VB.NET....

Serving page 1 which has a text box and a button. When the button is push
the button_click event is called. In this event I want to serve Page 2 if
the text box contains <value1> and page 3 if the text box contains <value2>.

I am having trouble with the code to effect the transfer. The IF clause
works correctly.
---------------
Private Sub Button1_Click(ByVal sender as System.Object, ByVal e As
SystemEventArgs) Handles Burron1.click

If Text1.text = "text1" then
Server.Transfer("page2")
else
Server.Transfer("page3")
End IF

End Sub
------------

Page 1 displays correctly. After clicking the button, I get
"Server Error in '/test' Application
Exception Details: System.Web.HttpException: Error executing child request
for page2

Both pages are in the same project and were built in VB.NET with .aspx
extensions.

Thanks for your help.
Jul 21 '05 #1
2 2338
Hi Dan,

Serving page 1 which has a text box and a button. When the button is push
the button_click event is called. In this event I want to serve Page 2 if
the text box contains <value1> and page 3 if the text box contains <value2>.

I am having trouble with the code to effect the transfer. The IF clause
works correctly.
---------------
Private Sub Button1_Click(ByVal sender as System.Object, ByVal e As
SystemEventArgs) Handles Burron1.click

If Text1.text = "text1" then
Server.Transfer("page2")
else
Server.Transfer("page3")
End IF
BTW, it Should be Text1.Text ="Value". Since you mentioned that IF condition
works properly, i think the problem lies in the way the Page 3 is handling
the QueryString.
The error points to the page2. Are you redirecting it to the right page???.

Hope this helps....
Happy Coding

End Sub
------------

Page 1 displays correctly. After clicking the button, I get
"Server Error in '/test' Application
Exception Details: System.Web.HttpException: Error executing child request
for page2

Both pages are in the same project and were built in VB.NET with .aspx
extensions.

Thanks for your help.

Jul 21 '05 #2
J
What are the full path names to the files. Just "page2", not "page2.htm" or
"page2.aspx" ? And make sure to use the other version of the call to
preserve posted data.
"Dan" <da*@dsully.com> wrote in message
news:OZ**************@TK2MSFTNGP15.phx.gbl...
VB.NET....

Serving page 1 which has a text box and a button. When the button is push
the button_click event is called. In this event I want to serve Page 2 if
the text box contains <value1> and page 3 if the text box contains
<value2>.

I am having trouble with the code to effect the transfer. The IF clause
works correctly.
---------------
Private Sub Button1_Click(ByVal sender as System.Object, ByVal e As
SystemEventArgs) Handles Burron1.click

If Text1.text = "text1" then
Server.Transfer("page2")
else
Server.Transfer("page3")
End IF

End Sub
------------

Page 1 displays correctly. After clicking the button, I get
"Server Error in '/test' Application
Exception Details: System.Web.HttpException: Error executing child request
for page2

Both pages are in the same project and were built in VB.NET with .aspx
extensions.

Thanks for your help.

Jul 21 '05 #3

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

Similar topics

6
by: StephenMcC | last post by:
Hi All, Got a quick query in relation to the Server.Transfer method available in IIS 5+/ASP. I've got an issue where I want to take a portion of an online app and extract this out into a web...
4
by: Harsh Thakur | last post by:
Hi, I'd like to know the performance related differences between Response.Redirect and Server.Transfer. I'd like to redirect the user to a different page. I can either do a...
5
by: Julien C. | last post by:
Hi all, I have an "EditeItem.aspx" page which lets me edit properties of an "Item". In the OnClick() event of my Save button, I do save Item changes to the database and then I redirect the user...
9
by: Mark | last post by:
Hello I'm trying to use a Server.Transfer in a try-catch (I cannot put it outside the Try-Catch as it is nested deep within a component that is called in a try-catch loop) The problem is that the...
5
by: Guadala Harry | last post by:
I've been reading up on Server.Transfer as well as doing some testing, and it appears to always raise the ThreadAbortException error. On one hand I've read a bunch of promotional-type material...
11
by: Alexander Bosch | last post by:
Hi, I'm having a problem similar to the one that's stated in this KB http://support.microsoft.com/default.aspx?scid=kb;en-us;839521 When I'm posting a page to itself with the bool value as true it...
8
by: bryan | last post by:
I've got a custom HttpHandler to process all requests for a given extension. It gets invoked OK, but if I try to do a Server.Transfer I get an HttpException. A Response.Redirect works, but I really...
6
by: n# | last post by:
A Basic Question in ASP.NEt 1.1 In Page_Load Event I am doing a Server.Transfer. But it throws an error on the browser windows showing "Server Application Not Found" Pls help me
4
by: evantay | last post by:
I'm using ASP.NET 2.0 with VS.NET 2005. I'm trying to access properties from my master pages within a page that inherits from that master page (a child page). However the values are always null....
2
by: =?Utf-8?B?YWxiZXJ0b3Nvcmlh?= | last post by:
Hi, I'm using Threads, and when I try to do Server.Transfer, I recieved an error. (child object does not exist...) My Code: Dim t As New Thread(AddressOf Hilo) Private Sub Hilo()...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...

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.