Changing redirected website using Form.Action

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mbewers1
    New Member
    • Feb 2009
    • 68

    Changing redirected website using Form.Action

    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?
  • mbewers1
    New Member
    • Feb 2009
    • 68

    #2
    Cancelling out Form.Action property after 1 instance

    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.

    Comment

    Working...