
Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
Hi Aussie,
The ASP.NET web page is a customized html based web page, one particularity
is that ASP.NET web page use a <form> with "runat=server" attribute, this
is used as the container of any other ASP.NET server controls, and all
those server controls' postback event can be correctly detected if they're
put inside this server-side form tag. Also, there can only contains single
"runat=server" <form> tag in an ASP.NET web page.
For your scenario, if you want to post different data field entries through
different button on the same page, I think you can consider the following
two means:
1. If you're using ASP.NET 2.0, you can utilize the "cross-page post"
feature, this can let you define multiple buttons on a single page and
configure them to postbac k to different url:
#How to: Post ASP.NET Web Pages to a Different Page
http://msdn2.microsoft.com/en-us/library/ms178140.aspx
#Cross-Page Posting in ASP.NET Web Pages
http://msdn2.microsoft.com/en-us/library/ms178139.aspx
2. You can certainly put multiple html <form> tags in a single ASP.NET web
page. However, make sure that only one form has the "runat" attribute set
as "true". Also, for ASP.NET server controls, they can only be put in
"runat=server" <form> e.g.
=======in aspx page========
<body>
..
<form id="form1" runat="server">
you can put ASP.NET server controls here
........
</form>
<form id="form2" action="other page'>
you can put only pure html elements here
.......
</form>
<form id="form2" action="other page'>
you can put only pure html elements here
.......
</form>
.......
=============
If you have any more specific questions on this, please feel free to post
here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Steven Cheng[MSFT] - 15 Aug 2007 02:09 GMT
Hi Aussie,
Have you got any further idea on this issue or does the suggestion in
previous replies help you some? If there is anything else we can help,
please feel free to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Aussie Rules - 15 Aug 2007 12:28 GMT
Hi,
thanks this is now sorted with you input..
thanks
> Hi Aussie,
>
[quoted text clipped - 10 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
Steven Cheng[MSFT] - 15 Aug 2007 13:34 GMT
Glad to be of assistance!
Have a good day!
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead