machowskaa
New Member
I'm trying to use a form to collect information, The forms have several pull-down menus, text boxs and radiobuttons.<BR><BR>I'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 = "[email protected]"<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.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 'text' 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>...so on and so forth.......