Can't get data from form into HTML email - 'Value' is not a member...

Discussion in 'ASP .Net Web Controls' started by Marie, Apr 11, 2004.

  1. Marie

    Marie Guest

    Hello

    When I try to run my asp.net page I get this error message

    <<
    Compilation Error
    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: BC30456: 'Value' is not a member of 'System.Web.UI.WebControls.CheckBox'

    Source Error


    Line 39: Dim HtmlMsgBody = "<HTML><HEAD></HEAD>
    Line 40: HtmlMsgBody = HtmlMsgBody + "<FORM><P>" + "<input name='' type='checkbox' disabled='true' "
    Line 41: if (kemregler_14_april.Value = "ikryssad")
    Line 42: + "Checked />"
    Line 43: else


    Source File: d:\users\marie\Anmalan_test.aspx Line: 41

    >>


    What I'm trying to do is to display the customer's choice
    of the form (in a HTML email as a verification to the customer),
    which is done by another form with disabled fields just collecting
    the data from the original form. Is this possible

    This is how the code looks:

    The form

    <<<<html><head><title>xxx</title></head><body><p>Jag vill <strong>anm&auml;la mig</strong> till f&ouml;ljande kurs/kurser:
    </p><form runat="server"><p><asp:checkbox ID="kemregler_14_april" Value="ikryssad" runat="server" /
    Kemikalieregler Stockholm 14 april N&auml;ringslivets Hus, Storgatan 19 <br></p><table width="95%" border="0"><tr><td width="200" valign="top" class="brod"><p>E-post:</p></td><td><asp:textbox ID="epost" MaxLength="60" runat="server" TextMode="SingleLine" /></td></tr></table><p><asp:button ID="submit_button" runat="server" Text="Skicka" OnClick="SubmitBtn_Click"
    </p></form></body></html>>>

    The server script (VB)

    <<<<%@ Page Language="VB" ContentType="text/html" %><%@ Import Namespace="System.Web.Mail" %><script runat="server"

    Sub SubmitBtn_Click(Src As Object, E As EventArgs
    'Skickar mai
    Dim emailMsg As New MailMessag
    emailMsg.To = "
    'emailMsg.To = "
    emailMsg.Cc = epost.Text 'Bekräftan till användaren
    emailMsg.From = epost.Tex
    emailMsg.Subject = "Anmälan

    Dim HtmlMsgBody = "<HTML><HEAD></HEAD>
    HtmlMsgBody = HtmlMsgBody + "<FORM><P>" + "<input name='' type='checkbox' disabled='true' "
    if (kemregler_14_april.Value = "ikryssad")
    + "Checked />"
    else
    + "/>
    HtmlMsgBody = HtmlMsBody + "Kemikalieregler Stockholm 14 april N&auml;ringslivets Hus, Storgatan 19 <br>
    HtmlMsgBody = HtmlMsBody + "</P></FORM>

    emailMsg.Body = HTMLMsgBod
    emailMsg.BodyFormat = MailFormat.Htm
    tr
    SmtpMail.Send(emailMsg
    Response.Write("Tack för din anmälan. Vi skickar dig en bekräftelse med e-post."

    catch exc as Exceptio
    Response.Write("NÃ¥got gick fel: " + exc.ToString()
    End Tr
    End Su

    </script>>>

    Thank you for helping me with this problem! :-
    Mari

    PS. Please also send me your answer to my email address sinc
    I'm in a hurry to complete this task because of the
    deadline for this project is already passed.
    Marie, Apr 11, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jason
    Replies:
    2
    Views:
    495
    Jonathan Mcdougall
    May 13, 2006
  2. ww
    Replies:
    4
    Views:
    377
    James Kanze
    Oct 26, 2007
  3. blangela
    Replies:
    8
    Views:
    650
    Erik Wikström
    Sep 26, 2008
  4. Shawn H

    HTML <form> value does not get posted

    Shawn H, Jan 8, 2007, in forum: ASP General
    Replies:
    2
    Views:
    185
    Shawn H
    Jan 12, 2007
  5. Kelly

    Can't get value into html form field

    Kelly, Jul 18, 2008, in forum: Javascript
    Replies:
    10
    Views:
    200
    Thomas 'PointedEars' Lahn
    Jul 18, 2008
Loading...

Share This Page