How to change the Form Action and Form id at run time. the form tag implemented on master page. please give any solution?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Sounds like you need to use JavaScript. You can do it as follows:
Note that this will only change the id and action of the form on the given page and will not affect your actual code (because it is a client-side change). If you wanted, you could encapsulate this logic in a function which is included in your master page itself, which would make it accessible from anywhere on the site.