title: How to change Action attribute of the aspnetForm on MasterPage dynamically
body: <p>We are trying to modify the Action attribute of the main ASP.NET form in the master page dynamically. </p>
  
  <p>The page has a radio button, user selects one of the options and clicks on submit, on postback, based on the selection the Form's action attribute should be set and the form should be submitted again automatically.</p>
  
  <p>We were trying to use JavaScript for the same.</p>
  
  <pre><code>document.forms[0].action = "option1.aspx";
  document.forms[0].submit();
  </code></pre>
  
  <p>But this doesn't seem to be working, there is no impact on the action attribute.</p>
  
  <p>if we don't use a master page, this can be achieved easily by using </p>
  
  <pre><code>this.Form.Action = "option1.aspx";
  ClientScript.RegisterStartupScript(this.GetType(),"test1",
      "document.form[0].submit();",true);
  </code></pre>
  
  <p>Sadly, we cant remove the master page .. any pointers on how can this be achieved.. ?</p>