473,498 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.net adds params cls and rid when submitting form

Hi,

I have an aspx page with a web form. I need to change the page that this
form posts to depending on certain conditions.

To do so, I have Javascript code on the page that looks like:

function OnLoadFunc()
{
if(document.Form1.elements["state"].value == 'regd')
{
document.Form1.action ="new.aspx";
document.Form1.method = "post";
document.Form1.submit();
}
}
This function is invoked in the onLoad event of the html body tag. And by
default the form's action="old.aspx", method=post.

The problem is that during submit, params 'cls', and 'rid' are appended to
the action URL, so that the post tries to go to URL:

http://localhost/new.aspx&cls=wi25&rid=c01.

This url, being bogus, results in an error. Why are these params being
added when the method is post? How cna I stop .net from doing so? Any other
way to do this?

Thanks.
-Shefali
Jul 25 '05 #1
1 1476
Shefali,

Why are you taking this client side actions in ASPX, while it goes quiet
easy on the server side with just a respond.redirect statement?

Cor
Jul 26 '05 #2

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

Similar topics

1
3744
by: Display Name | last post by:
the customer I'm developing a site for uses a canned form-parsing page that allows her to have an email subscription opt-in page add emails to a list she can manage using a link that you point your...
4
2271
by: Rick | last post by:
Hello, I'm having trouble with submitting my form when checking to see if data is present in the user-inputted fields. What I want to happen is for the user to input various pieces of data,...
6
1848
by: Nothing | last post by:
I have a form that opens. On this form there is information along with a button that opens a payment form. The payment form opens and I enter a payment type, cash check or charge, a payment...
2
1901
by: Coneection OLAP | last post by:
Hi: Me question is the next: I would like know how, I can do it to pass params, from a control of a page ASPX to other page ASPX, but I don't want that this params can see in the URL, ...
1
333
by: shefali | last post by:
Hi, I have an aspx page with a web form. I need to change the page that this form posts to depending on certain conditions. To do so, I have Javascript code on the page that looks like: ...
23
14448
by: Bjorn | last post by:
Hi. Every time i post data in a form the contents are being checked for validity. When i click the back-button, all data is gone and i have to retype it. It's obvious that only a few or none of...
2
7225
by: rn5a | last post by:
Assume that an ASPX page is accessed using the following URL: http://myserver/Page1.aspx?fname=john The value of the querystring fname (which is john) can be retrieved using both...
1
3190
by: dittu | last post by:
How to close the popup window when submitting the form? I have a sample.jsp. In that page one button is there. when button pressed, open popup window contains one "text box" and one " submit...
0
7121
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,...
0
6993
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...
0
7162
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
7197
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
7375
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...
1
4899
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...
0
4584
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...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
287
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...

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.