Reputation: 12610
I have a simple website and I use masterPage for designing my template.
everythings work fine, but when I add a Custom (google) Search Box in it my pages correpted.
infact asp does not support Nested Form and as you all know google use a simple form to get queries from the users.
so at first I redesign my site and put 2 Form in it. One server form for my pages content and one other form for google search box. untill here everything work fine .
so I force to add 2 new button beside of my search box and these buttons need a runat=server form, so now I need an approach that let me enable a third form (second runat=server form ) or find an approach to use simple form inside of runat=server form, actually
howcan I put 2 form inside each other or how could we enable a nested form ?
Upvotes: 0
Views: 1019
Reputation: 12610
Cause Asp Forms are not a display control and just accessible in code for programmers,
so I use it in a unregular manner,
as you all know every XML markup like XHTML (asp) have some element (in asp case : control) and each element have its own attribute (in asp case controls properties)
so I just need to put my controls inside the Form (root) Element and cause when page loading on client machine, whenever browser see the server form just change a flag to true (the server form is available) then you can use what ever you have inside of the form,
so if you can lagically put your controls inside of the form , so putit, nothing bad happen )
Upvotes: 0
Reputation: 55082
Nested forms won't be possible. You'll need to make those buttons work without being in a runat="server"
form.
Upvotes: 2