Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple forms in a single ASPX page - BIG limitation?
Message
 
To
01/10/2003 10:55:08
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00833850
Message ID:
00834011
Views:
103
Greg,

You can have multiple HTML forms on a page, but only a single ASP.Net Web form.

So if you need a standard HTML form just make sure it lives outside of the main ASP.Net tag. This may not address all cases, but hopefully it might work for you. Usually multiple forms etc. live in adjunct tables that are easy to isolate.

I think the rational is that ASP.Net forms can handle a variety of controls on a single page even the context is apprrently different. I've built some fairly complex forms pretty easily with AsP.Net that would have been an unmanageable nightmare with most other tools...

Hopefully one of these will do the trick for you...

+++ Rick ---

>I've been wanting to utilize ASP.NET for a long time but I have problems with implementing the framework with multiple forms.
>
>Apparantly Microsoft has a very unreasonable restriction that there can only be one form that wraps the entire ASPX page. Does Microsoft not know that much HTML content and data streams contain HTML that may contain their own form tags?
>
>My problem is that I have several dozen web sites that share advertising content from a 20,000+ record SQL table. Depending upon search results and the category you are in on a site the ASP code selects relevent advertising content for what the user is doing on a specific site. Some of this content is banner ads, some content is text links, others are submit forms like for Overture, Google, domain name registration, etc. Cooking.com for example has a great little advertising search form that we use on dietfacts.com. It converts well because the user types in what they are looking for on dietfacts.com and then the form sends them to cooking.com with our tracking ID.
>
>But how can I show any of this content in my ASPX pages if Microsoft's model only allows one form? To make matters worse I'm starting to incorporate some dynamic XML feeds that may one moment contain a banner ad and the next a submit form. This content can be displayed anywhere on the web page... top, bottom, body, or side panels.
>
>I was trying a workaround that would parse out the form action in real-time, parse it and use that information to create a server-side re-direct that would send the query to the appropriate URL. This is very clumbsy and after half way through getting it to work I found out a bigger problem. Many affiliate networks like Link Share and some Commission Junction advertisers block re-directing through the server to avoid unwanted pop-up solitations and/or for fraud protection. They implement this my using hidden variables or Javascript in the HTML so that they are only charged for clicks and traffic when the user actually clicks the button in the HTML and goes directly to their site. Otherwise, some shrewd web developers generate money by redirecting through the server even though the end user had no interest in the product. So if you redirect through the server the user ends up at the advertisers site but you don't get any credit for the lead. So I basically have to show the HTML as
>given from the advertiser.
>
>I'm not sure what Microsoft was thinking with the single form restriction. So much content from various sources include forms and as it stands I can't recommend the .NET framework for any application that uses flexible advertising content. It also makes it much more difficult to create flexible/reusable components when you have do design around this limitation.
>
>Does Microsoft intend to fix this limitation? Is there a workaround that I'm not aware of? A solution that can work not knowing the exact content ahead of time (except that it may contain a form) and that must function without redirecting through the server?
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform