Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 141865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:50:43+00:00 2026-05-11T07:50:43+00:00

We are trying to modify the Action attribute of the main ASP.NET form in

  • 0

We are trying to modify the Action attribute of the main ASP.NET form in the master page dynamically.

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.

We were trying to use JavaScript for the same.

document.forms[0].action = 'option1.aspx'; document.forms[0].submit(); 

But this doesn’t seem to be working, there is no impact on the action attribute.

if we don’t use a master page, this can be achieved easily by using

this.Form.Action = 'option1.aspx'; ClientScript.RegisterStartupScript(this.GetType(),'test1',     'document.form[0].submit();',true); 

Sadly, we cant remove the master page .. any pointers on how can this be achieved.. ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T07:50:43+00:00Added an answer on May 11, 2026 at 7:50 am

    This is something which I have read they wish they had not done. The Form tag gets its action attribute hardcoded. You have to use a Control Adapter in order to control its construction at runtime. I use it especially for URL Rewriting, when I require the postback URL to be the rewritten one I have created. Scott Gu made the code for it and you can find it here:

    http://www.scottgu.com/blogposts/urlrewrite/UrlRewrite_HttpModule1.zip

    And the address for the article:

    http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 66k
  • Answers 66k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer If mainWindow is nil then the sheet will be displayed… May 11, 2026 at 11:26 am
  • added an answer You could use the Linked Server feature of SQL Server… May 11, 2026 at 11:26 am
  • added an answer You can take care of that kind of thing on… May 11, 2026 at 11:26 am

Related Questions

We are trying to create a web-service that we plan to pass a variable
We are trying to implement a REST API for an application we have now.
We are trying to duplicate one of our informix database on a test server,
We are trying to look at optimizing our localization testing. Our QA group had
We are trying to build a High-Volume Orders Record System. There are three primary
We are trying to integrate tests in our daily builds using TestComplete, so far
We are trying to get our .NET devs to use the ASP.NET Development Server
We are trying to trace the time a windows default printer was changed and
We are trying to make big decisions about our support for classic asp. Does
We are trying to come up with our client and server standard and there

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.