I have been looking around for a while and I can't find any clear documentation and the videos have not made it clear either (still great thou!) and there are some inconsistencies in the Starter Packs.
Some usercontroles seem to have the form tag in the ascx file but in other places people recommend to have them surronding the added macro.. So what should it be? I can see some issues here mixing my own controls..
Thanks for the help.. Thats looks like the easiest thing to do, but what to do with "not mine" usercontrols that have a form tag? Also for pages that don't have any controls, will this affect performance and memory usage by always loading it when not really needed(Not sure about the overhead)?
I'm just trying to get this right from start and want to try follow "best practice" :)
Where should the FORM tag be placed?
Hi,
I have been looking around for a while and I can't find any clear documentation and the videos have not made it clear either (still great thou!) and there are some inconsistencies in the Starter Packs.
Some usercontroles seem to have the form tag in the ascx file but in other places people recommend to have them surronding the added macro.. So what should it be? I can see some issues here mixing my own controls..
Cheers,
Stefan
Hey Stefan,
Easiest to place them right after the body tag in your Master template.
Rich
Hi Rich,
Thanks for the help.. Thats looks like the easiest thing to do, but what to do with "not mine" usercontrols that have a form tag? Also for pages that don't have any controls, will this affect performance and memory usage by always loading it when not really needed(Not sure about the overhead)?
I'm just trying to get this right from start and want to try follow "best practice" :)
Hey Stefan,
I would take them out of the user controls, an ASP.NET site can only have *ONE* form tag with runat="server"
Unless you only have one usercontrol it's going to be tricky to only include it when needed (if you have two on one page the site won't run)
The overhead is a little bit of viewstate that gets added to the page, I wouldn't worry too much about this.
Regards
Rich
Thanks a lot Rich!
is working on a reply...