473,394 Members | 1,724 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,394 software developers and data experts.

Setting form element values in an exception handler

Hello,

I have a web form which, when an exception is thrown in its
codebehind, should be redirected to another from to display
the details of the error message.

I have a special asp textbox in this form which is invisible
and which will be assigned the value of the error message in
the exception handler so that in the Page_Load of the
new web form, the value of the error message is retrieved
from the Request.Form collection.

However, nothing seems to work. I had to abandon the non-visible
textbox in favour of a hidden input (since it seems that non
visible text boxes aren't included in the Request.Form collection).
No matter - I cannot seem to get the error message passed
from one form to another. It's strange, because I can see
values that I assign in other elements of the form (outside of
the exception) passed to the Request.Form collection.

Can anyone shed any light on what's going on here?

TIA,

--
Akin

aknak at aksoto dot idps dot co dot uk
Nov 18 '05 #1
2 1736
Your posting is a bit unclear.

Are you attempting to Transfer to a Different Page, hence the reference to
"another from" (which i assume was meant to be another form)
If you are attempting to Transfer to a different web form then you may want
to use Server.Transfer() and explicitly tell it to Preserve the Forms. Read
the MSDN Documentation for more info and sample code.
Hope this helps, Posting is provided as is
"Sky Fly" <no****@blackhole.com> wrote in message
news:c5*************@ID-18325.news.uni-berlin.de...
Hello,

I have a web form which, when an exception is thrown in its
codebehind, should be redirected to another from to display
the details of the error message.

I have a special asp textbox in this form which is invisible
and which will be assigned the value of the error message in
the exception handler so that in the Page_Load of the
new web form, the value of the error message is retrieved
from the Request.Form collection.

However, nothing seems to work. I had to abandon the non-visible
textbox in favour of a hidden input (since it seems that non
visible text boxes aren't included in the Request.Form collection).
No matter - I cannot seem to get the error message passed
from one form to another. It's strange, because I can see
values that I assign in other elements of the form (outside of
the exception) passed to the Request.Form collection.

Can anyone shed any light on what's going on here?

TIA,

--
Akin

aknak at aksoto dot idps dot co dot uk

Nov 18 '05 #2
Hello,

Sorry if the post was unclear. Yes, I am trying to Transfer to a
different page.

I have tried using Server.Transfer (with the preserve value set to
'True'), but this doesn't seem to make any difference.

Any other ideas?
<jo*****@driver.net> wrote in message
news:e0**************@TK2MSFTNGP12.phx.gbl...
Your posting is a bit unclear.

Are you attempting to Transfer to a Different Page, hence the reference to
"another from" (which i assume was meant to be another form)
If you are attempting to Transfer to a different web form then you may want to use Server.Transfer() and explicitly tell it to Preserve the Forms. Read the MSDN Documentation for more info and sample code.
Hope this helps, Posting is provided as is
"Sky Fly" <no****@blackhole.com> wrote in message
news:c5*************@ID-18325.news.uni-berlin.de...
Hello,

I have a web form which, when an exception is thrown in its
codebehind, should be redirected to another from to display
the details of the error message.

I have a special asp textbox in this form which is invisible
and which will be assigned the value of the error message in
the exception handler so that in the Page_Load of the
new web form, the value of the error message is retrieved
from the Request.Form collection.

However, nothing seems to work. I had to abandon the non-visible
textbox in favour of a hidden input (since it seems that non
visible text boxes aren't included in the Request.Form collection).
No matter - I cannot seem to get the error message passed
from one form to another. It's strange, because I can see
values that I assign in other elements of the form (outside of
the exception) passed to the Request.Form collection.

Can anyone shed any light on what's going on here?

TIA,

--
Akin

aknak at aksoto dot idps dot co dot uk


Nov 18 '05 #3

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

Similar topics

21
by: Michael Bierman | last post by:
Please forgive the simplicy of this question. I have the following code which attempts to determine the color of some text and set other text to match that color. It works fine in Firefox, but does...
7
by: charliewest | last post by:
Using .Net CF, i have created a 2 dimension ArrayList, and "binded" this list to a ComboBox control using the "DataSource" property. I have set the DisplaySource and ValueMember properties as well....
2
by: Sky Fly | last post by:
Hello, I have a web form which, when an exception is thrown in its codebehind, should be redirected to another from to display the details of the error message. I have a special asp textbox...
19
by: Taras_96 | last post by:
Hi everyone, How do you detect that a form element has been changed? This thread: ...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
8
by: hanseymoon | last post by:
How do you create a text input box, which shows a default value of 1+ and blocks the user from deleting it? Thanks so much! :))
2
by: Ralph | last post by:
Hi I don't understand why it's not working: function schedule(imTop){ this.tdImagesTop = imTop; } schedule.prototype.selectEl = function() { alert(this.tdImagesTop);
8
by: Andrus | last post by:
..NET 2 Winforms application. How to create new setting and set it default value in userSettings section of app.config file or overwrite existing setting value ? I found code below in this list...
14
by: white lightning | last post by:
How to have <select onchange="this.form.submit()"and also a Submit button on one form? I have something like this: <form action="<?php $_SERVER; ?>" method="post"...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
Oralloy
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,...
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...

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.