Rewrite the master page form action attribute in asp.net 2.0

Rewrite the master page form action attribute in asp.net 2.0

 

When all your web pages are reference to a master page, where a form element has already existed. But you want to rewrite the form action attribute and post data to other web page.

 

So how to rewrite the form action attribute?

1. Use simple HTML forms and elements, instead of server form and controls.

2. Use javascript code. For example,

btnOK.Attributes.Add(“OnClick”, “document.forms[0].action=’otherwebpage.aspx’;”);

 

posted @ 2006-07-25 09:40  Rickie  阅读(1781)  评论(0编辑  收藏  举报