473,699 Members | 2,738 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 3497
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
8761
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
2632
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
5438
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
3768
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
9687
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
3104
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
16390
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
5344
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
1653
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
8612
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9171
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...
0
9032
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8905
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
8880
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
7743
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...
1
6532
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.