Page Templates
page 7 of 7
by . .
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 31141/ 56

Forms

Forms

You may (well, should have) taken a look at that code and said - "Hey, why is the form tag inside the user control" (or something to that effect). Well, yes, the form is inside the user control and this will cause problems if you want to have other web server controls on the page.

However there is the HtmlForm class to the rescue.      

Imports System.Web.UI.HtmlControls
...

Public
webform As New HtmlForm()
...
Controls.Add(LoadControl("samplecontrol.ascx"))

That should solve all of your problems with that.

Summary

Well, this article should have been detailed enough to show you the basics of creating a page template and it should be obvious how they can benefit your site. If in doubt, check out my other article, Consistent Website Design, on the topic.


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-20 9:48:42 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search