Changing the Action attribute in the 'Form' tag

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

    Changing the Action attribute in the 'Form' tag

    Hi there

    How can I get the Form.Action value to change value when a HTML button called 'doiSubmit' on the page is selected but to stay null the remainder of the time?

    I've placed the functionality in the Page_Load method as it seems the most sensible place to put it. The code I've developed is:

    Code:
    ContextStaticAttribute csa = new ContextStaticAttribute();
            form1.Action = csa.Match("doiSubmit") ? "http://dx.doi.org" : string.Empty;
    I haven't found any related help elsewhere on the net and I don't think it's possible to use Response.Redire ct() and an ASP button for this.

    Thanks
    Matt
Working...