p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: ASP.NET Website Programming Problem-Design-Solution (http://p2p.wrox.com/forumdisplay.php?f=23)
-   -   Mailing list module has error - HELP (http://p2p.wrox.com/showthread.php?t=3572)

drfunkie September 6th, 2003 09:19 PM

Mailing list module has error - HELP
<VB.Net version of the code>
I created a subscription form with the wizard, then I created a very no thrills html page to hold the form. I then attempted to subscribe using the form and received an error on the following page:

localhost/ThePhileVB/WebModules/MailingLists/Subscribe.aspx?ListId=14&FirstName=David&LastName= Smith&Email=smithD@cox.net&Submit1=Submit&Action=S ubscribe

Here is the error on the page

Control 'Header_SignOut' of type 'LinkButton' must be placed inside a form tag with runat=server.

The subscription was successful: I received an email, and the database was updated with the subscription, however the subscribe.aspx page came up with the above mentioned error.

I edited the siteheader and found nothing wrong with it.

Please help, I'm clueless

Imar September 7th, 2003 04:55 AM

Hi there,

It looks like your User Control 'Header_SignOut' is placed incorrectly on the host ASPX page. Each User Control must, as the error indicates, be placed between a <form runat="server"> tag and not before or after the form.

Can you post the code for Subscribe.aspx? It will be easier for us to see the problem.....


Imar Spaanjaars
Everyone is unique, except for me.

drfunkie September 7th, 2003 01:08 PM

You are right IMAR, the form tags are missing from the code on the subscribe.aspx page.

The form seems to be an oversight by the developers of the book. The tags are missing in both the C# version and the VB Versions of the code.

Here is my subscribe.aspx page with the form tags.

<%@ Register
    TagPrefix="WroxUser" TagName="SiteHeader"
<%@ Register
    TagPrefix="WroxUser" TagName="SiteFooter"
<%@ Register
<%@ Page
    Inherits="Wrox.WebModules.MailingLists.Web.Subscri be"
<!doctype html public "-//w3c//dtd html 4.0 transitional//en" >
        <title>MailingLists: Subscription</title>
        <meta name="code_language" content="Visual Basic 7.0">
        <link rel="stylesheet" href="../../Styles/ThePhile.css" />
        <link rel="stylesheet" href="../../Styles/Navigator.css" />
    <form id="subscribe" runat="server" method="post">
        <WroxUser:SiteHeader id="Header" runat="server" />
        <table width="100%" border="0" cellspacing="4" cellpadding="2">
                <td width="100%" valign="top">
                    <asp:Label id="Subject" runat="Server"
                        Visible="false" />
                    <asp:Label id="Message" runat="Server"
                        Visible="false" />
                    <asp:Label id="EmailRequired" runat="server"
                        Text="The Email address is required"
                        CssClass="Error" />
                <td align="right" valign="top">
                    <Wrox:Navigator id="MenuNav" runat="server"
                        TransformFile="/ThePhileVB/Styles/NavMenu.xslt" />
        <WroxUser:SiteFooter id="Footer" runat="server" />
        </form> </body>

The page is working now but the Link to [blue]unsubscribe is not working, however this is a peace of cake to fix.

Thanks again IMAR

Imar September 8th, 2003 12:09 PM

Right, just noticed that you edited your message. I was about to write an answer, but I see it's not necessary anymore.

Glad it works now.

BTW, you may want to send this to Tech Support, so it can be added to the Errata section of the book: http://www.wrox.com/contact/techsupport.shtml



Imar Spaanjaars
Everyone is unique, except for me.

All times are GMT -4. The time now is 01:24 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.