Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple forms in a single ASPX page - BIG limitation?
Message
 
To
03/10/2003 10:46:11
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00833850
Message ID:
00834917
Views:
32
I think that ASP is in many ways much easier to work with for non-computer people than ASP.Net. So from an end user perspective that needs to modify something ASP.Net is going to complicate things considerably for them.

Remember though that at the same time you can do most things that ASP could also with ASP.Net - you can use the same syntax and expressions etc. The only real difference is that you can't do conditional blocks of code like %if... some html %endif etc. But the key feature - use of expressions and calling methods or functions - is still there.

I guess it's a matter of deciding who you are rebuilding the app for <g>...
From a developers POV ASP.Net sure makes a lot more sense and makes a lot of things easier and quick.

+++ Rick ---


>This is definitely sounding more promising than I thought.
>
>My main issue (or hangup I guess you could say) that I'm still trying to get past is the sheer number of sites and the variety of skills of people maintaining the content.
>
>Currently close to 50 sites are actually 'up'. We have a list of 300+ more that are to be up ASAP. The content though is often managed by those with little or no HTML experience. They simply take the HTML from an advertisers and paste it into a form. Or they fill out a link form. Or they fill out an article form. 75% of the work on the web sites is entirely database driven.
>
>Probably the best generic example of the framework implementation is dojangweb.com. The guy who manages this has no programming experience except for a tiny bit of basic HTML. Content is mostly managed by databases and a handful of simple ASP pages he has added.
>
>On the other end of the spectrum is dietfacts.com. The webmaster using the framework here is very experienced in ASP and has an entire seperate database of diet content that I had nothing to do with.
>
>An example of an end between site that uses a lot of the framework features is spiritualminds.com or animalsites.com.
>
>Yet all these sites are using the exact same framework code in ASP.
>
>Webmasters utilize the framework by calling methods and setting properties...
>
>
> Set oMember = new member
> oMember.confirmemail = False
> oMember.bkgdcolor = "steelblue"
> oMember.showsignupform
>
>
>The webmaster using the framework doesn't ever change the methods in the showsignup form and most never even look in the method. They of course have read access to the source if they wish but do not have write permission.
>
>So I'd love to move this to .NET but it gets mucky not only for the work I would have to do to the framework, but for how I would roll it out to all the webmasters who use the framework. If it is harder for them to use the framework, then it won't be worth it.
>
>I'm completely prepared to write a new framework from the ground up using .NET so I'm not look so much to move over all these sites. What I want though is something that is not just easier for me to develop and maintain; but more importantly easier for the webmasters that use the framework as well.
>
>I guess what I'm saying is methodology and how the framework is used is probably more important than how easy it is for me to build it. If it takes me extra time that's ok if it can save time in managing the hundreds of websites.
>
>Thank you so much for your expertise. I've read your wonderful articles for years and I'm very thankful that you've taken the time to think about my problem.
>
>I will study more and try some things out.
>
>Greg
>
>
>
>>>Rick,
>>>
>>>Thanks for the reply. Your expertise is very much appreciated.
>>>
>>>So I take it from what you are saying is that I could move this framework to .NET as long as I keep my 'one' ASP.NET form self-contained inside my body of the form. And it would be ok to have ASP.NET code above and below my ASP.NET form. Just no other ASP.NET forms.
>>
>>Actually I think you can even use forms inside of the ASP.Net form - I just ran into this yesterday where I have a big form that contains a bunch of other forms internally to submit each item, but it has to submit to a spearate page (or if you go back to the same explicitly with an ACTION).
>>
>>This definitely works...
>>
>>>
>>>The biggest limitation I'm seeing now is that it makes it incredibly difficult to make reusable ASP.NET modules that contain forms.
>>
>>Not really. With ASP.Net you can throw a lot of things that you needed multiple forms for in the past and throw it all onto a single form to handle.
>>
>>If you need modularity, then using User Controls is the way to go although building interactive User Controls is a little bit of work.
>>
>>>For example, I have a web poll in my far right panel on dietfacts.com. It is a self-contained form that I can put on any web sites using my framework. Example syntax.
>>>
>>><% Set oPoll = new poll
>>> oPoll.showpoll()
>>>
>>>
>>>But how can I have my web poll self-contained in my right panel using .NET if my body may also have a .NET form for editing an article, collecting user information, etc? The answer is, I can't.
>>
>>Why not in a user control? As long as you have the routing straightened out the user control can handle the Postback (although you may have to pass it on from the main page).
>>
>>The alternative is to use non Runat="Server" forms and post back to the same page with a different parameter that can indeed handle the logic that you need routing from there (which in some cases is actually easier than
>>building postback user controls).
>>
>>+++ Rick ---
>>
>>
>>>In my dietfacts.com example I have a search form in the header of my page.
>>>
>>><% Set oSearch = new search
>>> oSearch.showsearch()
>>>
>>>
>>>So even in this most basic example of code reuse, with two simple forms on the home page of dietfacts.com, .NET can't do it.
>>>
>>>If this framework was just used in one site it wouldn't be nearly so bad or limiting. But I'm using it in several dozen websites, which could easily grow to several hundered... A few other example sites using the framework are spiritualminds.com, animalsites.com, churchguides.com, secludedvacations.com, dojangweb.com, jokepro.com, affiliateplan.com, linkgeneral.com, jobkings.com, mrstar.com, fastlotto.com, americanboaters.com, and about another 20 more. All these sites share a common database and code framework making it easy to bring up new sites and make changes to the base framework to add features to all sites.
>>>
>>>But it's seeming more and more impractical to design a comprehensive framework in .NET for multiple websites given the 'one form' limitation.
>>>
>>>Even if I was to re-write for .NET from the ground up, I'm just not sure how to create anything near as re-usable as I have now. Now I can drop any of my modules (search form, web polls, newsletter signup, etc.) on a page anywhere I want without worrying about limiations.
>>>
>>>.NET seems to set code reuse aside as it relates to forms. Ironically forms are the things I want to re-use most often on different web sites. I pretty much flow the content that varies from site to site around the forms I've built to reuse. Because the content from site to site could contain site specific forms or HTML forms from the 'ad table', I can't wrap my entire framework in a ASP.NET form tag. But wrapping the entire framework in the ASP.NET form tag is the only real possible solution I see to getting any kind of reusability. Sort of a vicious circle.
>>>
>>>My conclusion is that Microsoft was focused on making it easy to build one site or one page rather than creating re-usable components that could be used on many sites and many pages. So anything you write in .NET that contains a form basically has no re-use value at this point. At least not in the context of multiple web sites with varying levels of complexity.
>>>
>>>I have a hard time wrapping my brain around how Microsoft's designers were willing to live with this limitation. As it stands I think I'm going to be better off sticking with ASP. Am I missing an obvious solution to doing what I want in ASP.NET?
>>>
>>>I really appreciate you taking the time to read my rant and would welcome any advice you may have.
>>>
>>>Greg
>>>
>>>
>>>>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
Reply
Map
View

Click here to load this message in the networking platform