473,748 Members | 2,891 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing redirected website using Form.Action

68 New Member
Hi

Within a page of my website, I have HTML <input> text box and button control which, when selected, redirect to the site: http://dx.doi.org

The URL for this site is set in the ASP code page using the tag line:
<form method="post" id="form1" action= "http://dx.doi.org" runat="server">

and I was instructed to do this from another person.

What I want to do is stop the page from redirecting the user to this 'action' site when they interact with other controls on the web page, and when they want to go to another page of my site.

I have tried setting the action field to null within the Page_Load method, but this doesn't do anything as it only stops the page from being correctly redirected when the HTML input button is selected.

Sorry for the long-winded post, but wanted to explain it as best I could.
Anyone know what I need to do?
Mar 24 '10 #1
1 3499
mbewers1
68 New Member
Has anyone got any suggestion for re-dressing this problem?

I can't see how it is possible to achieve with HTML and ASP inter-twined.
I looked on one site for a related issue and they suggested using the following method:

VerifyRendering InServerForm(co ntrol);

but this was erroneous on output, with an object reference error.

Just to re-iterate again, I only want the form.Action property to redirect to a specific site when a HTML input button is pressed. At all other times, I don't want it to redirect.
Apr 4 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

9
8764
by: Dave Martin | last post by:
I've successfully used CURL to maneuver around and through sites but a new site I've been trying to work with has got me stumped. To retrieve the data I'm trying to get a login is required. If you go to any page in the "member" area without logging in you get directed to a https connection and hit login.php (ie: you end up at https://www.domain.com/login.php). The problem, I believe, lies in the fact that the form on that page...
3
2633
by: Petre Huile | last post by:
I'm trying to mail form data by using the technique: form.action="mailto:address?Subject=subject&body=bodyText" (the placeholders above are obviously not real :)). The thing is I want to customize the body text, but the submit action of the form always overwrites any body text I set in the line above with the default output of the form (a fieldname=value list).
2
5441
by: Dirk Grosskopf | last post by:
Hi I'm having the following js problem: A webapplication has a page with a button event that pops up a file upload dialog. this dialog is a form with a locally absolute URL to a webapp '/FileUpload' as action The problem is, as long as I'm using IE the form action is fired. When I'm using Firefox it doesn't work. It only works when I'm using the full quallified URL 'http://localhost:8080/FileUpload'. OK this is a workarround, but I can...
5
3772
by: bissatch | last post by:
Hi, I have been trying to come up with an idea to reduce double submissions where a user clicks refresh and, for example, another row is INSERT into a table. Originally, I would have a form page. When a user submits the form (ie. index.php), I would script it so that when the form action would be the same page but it would use the address 'index.php?action=add'. This is bad (mmm-kay) as when the user refreshes the page it would add...
2
9690
by: belgie | last post by:
Whereas in Asp I could submit my form contents to any other Asp page, it appears that in Asp.NET the primary Asp form will only submit to itself. I have tried changing the Action attribute in the Form tag, but it changes itself back when compiled. I have also tried changing the form Action attribute in client-side javascript prior to submitting the form, but I get this error: The View State is invalid for this page and might be...
4
3106
by: wwwmike | last post by:
How can I overwrite the <FORM action=attribute? I can add new attributes with Dim xx As System.Web.UI.HtmlControls.HtmlForm xx = Page.FindControl("form1") xx.Attributes.Add("something", "POST") ....but I can not overwrite the action attribute like (Page.Load event)
5
16391
by: Rajkiran R.B. | last post by:
I want to log in to a website using C# code.. The main aim is to check whether the username and password I provide is correct or not. I used the following code bool somefunction() { string username = textbox1.text;
18
5348
by: vetrib2w | last post by:
Hi , In short: How to change the form action attribute value using javascript and that need to supported in IE also ? BRIEF: I am using ajax function to submit the form. I am also changing the action of the form tdynamically using java script.Its is working fine in FF.But i am getting the ERROR as "object doesn't support this property or method" in IE
0
1657
by: Lunatiko | last post by:
<?php $username="user"; $password="pass"; $cookie="cookie.txt"; $url = 'http://www.affilate.mikkelsenmedia.dk/partnersystem/mylogins.php'; $postdata = "username=".$username."&password=".$password."&send=Submit"; $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
0
8987
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
9534
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9316
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9241
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
8239
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...
0
4867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3303
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
2777
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2211
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.