Collecting Data from Forms using .NET , text, radi

Results 1 to 2 of 2

Thread: Collecting Data from Forms using .NET , text, radi

  1. #1
    Join Date
    Dec 1969

    Default Collecting Data from Forms using .NET , text, radi

    I&#039;m trying to use a form to collect information, The forms have several pull-down menus, text boxs and radiobuttons.<BR><BR>I&#039;m new to ASP .NET and I see alot of examples where the values are already given to the variables. For example...<BR><BR> msg.To = ""<BR><BR>but how to I collect this information that a user inputs and then would be captured via a variable and send to my e-mail.<BR><BR>I hope to made some sense,,,Any links that may show a good example of .NET form collection e-mail would be much appreciated.<BR><BR>Again I see the smtpMail class but I only saw the method for To. CC., etc. but I need to collect information into the long form and then send the email.

  2. #2
    Join Date
    Dec 1969

    Default RE: Collecting Data from Forms using .NET , text,

    Make sure the form is set to runat="Server". Use ServerControls (TextBox, DropDownList, and RadioButtonList) for your input elements, again runat = "Server". Then just reference them by name. A text box has a &#039;text&#039; property:<BR>msg.TO = txtRecipient.Text<BR>msg.From = txtRecipient.Text<BR>A drop down list has a selected index, which can be used to get the right item:<BR>msg.Priority = ddlPriority.Items(ddlPriority.SelectedIndex).Value <BR>Radio Button Lists work similiarly.<BR> on and so forth.......

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts