Click here to Skip to main content
15,886,049 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hi.
i use a form view , the visitors fill the textboxs and variables save to table.
how can i send that textbox to email either?
i know how to send to email in code behind but my problem is the code behind not recognized the textboxs in form view.

thank all.
Posted
Updated 29-Jul-15 8:54am
v2
Comments
Suvendu Shekhar Giri 29-Jul-15 14:46pm    
Requirement is not clear. Form view doesn't recognise text box means?
Try describing cleanly about your requirement and it's good to share the relevant code.
Sergey Alexandrovich Kryukov 29-Jul-15 14:55pm    
Not clear at all; to me, it looks more like lack of effort. I tried to answer the question, please see Solution 1.
—SA

1 solution

I hope you can get the Text property of a text box: https://msdn.microsoft.com/en-us/library/d3hta9ke(v=vs.110).aspx[^].

To send a mail message, you can use
https://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage%28v=vs.110%29.aspx[^],
https://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient%28v=vs.110%29.aspx[^].

If you have to use any other service except an SMTP server, you can easily find the client-side code in 3rd-party open-source projects.

—SA
 
Share this answer
 
Comments
Member 11829564 29-Jul-15 16:26pm    
when i create the Asp textbox in out of formview area, i can use that in code behind, but my problem is i can't use texboxs in formview in codebehind.
thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900