views:

16

answers:

1

I have asp.net web page that have the following :

<form id="WebCaptureForm" name="WebCaptureForm" onsubmit="return checkform(this);" enctype="multipart/form-data" method=post 
    action="http://site/page.aspx?idn=1&amp;tr=100d1165&amp;action=savenew"&gt;

I want to make new page with master page that contain the same code but how can i make the above code in a web page that have a master page

+1  A: 

Since this <form> isn't a server-side form (runat="server"), you shouldn't have any trouble using it in a master page. Note that:

  • A <form> cannot be nested in another <form>.
  • Any page in asp.net can only have a single (visible) server-side <form>.
  • If you do want a server-side <form>, you can't really control its name, id, method and action. Action is the hardest one here, as in general, you want each page to post-back to itself.

If you want to have that code is a single page, you can create another ContentPlaceHolder, and place is in the maste page, outside of your main <form> tag.

Kobi