<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Web Forms</title><link>http://forums.asp.net/18.aspx</link><description>All about building ASP.NET Pages - server controls, events, validation, etc.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: quick email- Contact Us Form - Name/Email isn't coming through  from 1st wizard step</title><link>http://forums.asp.net/thread/3276005.aspx</link><pubDate>Mon, 06 Jul 2009 05:29:35 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3276005</guid><dc:creator>venkatu2005</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3276005.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3276005</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;nadude:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/p&gt;&lt;p&gt;address instead of username, but that is too much sql editing for me, and i got lucky getting it to work the first time. &lt;/p&gt;
&lt;p&gt;so i just need a different hidden control on the field that has its own sql source,&amp;nbsp;that gets its value changed everytime a new user is selected in todropdownlist - to be the value of the (select username and useremail where username = todropdown)&lt;/p&gt;
&lt;p&gt;hope that makes sense? &lt;/p&gt;&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;As i said you are binding Username and email to dropdownlist so how the other users know his/ her email ID &lt;/p&gt;&lt;p&gt;Your Dropdownlist1.DataTextField=&amp;quot;Username:&lt;/p&gt;&lt;p&gt;Dropdownlist1.DataValueField=&amp;quot;Email&amp;quot;&amp;nbsp; &lt;/p&gt;&lt;p&gt;like this you have to bind data you your dropdownlist so when the user chooses the username he / she knows only the username but not the EmailID because it has been bind it on selectedvaluefield. I think you understand. Further you have any query let me know..&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: quick email- Contact Us Form - Name/Email isn't coming through  from 1st wizard step</title><link>http://forums.asp.net/thread/3274562.aspx</link><pubDate>Sat, 04 Jul 2009 10:42:55 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274562</guid><dc:creator>nadude</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274562.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3274562</wfw:commentRss><description>&lt;p&gt;hey, thank you sooo much!!!&amp;nbsp;i hate when its just such a small difference in syntax that makes the difference!!! it worked like magic!!! &lt;img title="Laughing" border="0" alt="Laughing" src="http://forums.asp.net/tiny_mce/jscripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;venkatu2005:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Let me know where you want to hide or disable the Dropdownlist ie: on which page and what the reason to disable..&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;as for the hiddenfield reason, ok i&amp;#39;ll try explaining, hope i don&amp;#39;t confuse you. &lt;/p&gt;
&lt;p&gt;1. main purpose of the site is for users to communicate to each other privately (messages), without disclosing their email addresses to each other for privacy reasons. so they should be able to pick a username, and then send a message, without seeing/knowing the selected user&amp;#39;s email&lt;/p&gt;
&lt;p&gt;2. the way i&amp;#39;ve got the message db table, sql query and page working so far is like this: &lt;/p&gt;
&lt;p&gt;subject, message, from(userid), and to(username) are inserted to the table from the page. TO is selected from a dropdownlist of all users. and message gets stored in the table. when the other user logs in, their messages page, does a select where their username is in the to field so only their messages show on the page. ALL THIS IS WORKING FINE. &lt;/p&gt;
&lt;p&gt;3. now i just wanted to add an email alert to the &amp;quot;To user&amp;quot; saying they&amp;#39;ve recieved a new message on the site. which i got working with your help. the email address in the sendbutton_click value is set to dropdownlist1.selectedvalue&lt;/p&gt;
&lt;p&gt;- the dropdownlist1 sqlsource, selects username, and useremail address where username = ToUser. (ToUser is teh id of the to user select dropdown)&lt;/p&gt;
&lt;p&gt;- to user dropdown is on autopostback, so when that changes, it automatically changes teh value of teh dropdownlist1 to the selected user&amp;#39;s email address. &lt;/p&gt;
&lt;p&gt;- which gives the value of the to email address for the send mail. &lt;/p&gt;
&lt;p&gt;all the above works perfectly, except for teh initial requirement of user email address privacy.&amp;nbsp; as the second dropdownlist1 (with to users email), is visible to the logged in user.&lt;/p&gt;
&lt;p&gt;4. i know i could go back and change the messages and compose pages sql queries to use useremail address instead of username, but that is too much sql editing for me, and i got lucky getting it to work the first time. &lt;/p&gt;
&lt;p&gt;so i just need a different hidden control on the field that has its own sql source,&amp;nbsp;that gets its value changed everytime a new user is selected in todropdownlist - to be the value of the (select username and useremail where username = todropdown)&lt;/p&gt;
&lt;p&gt;hope that makes sense? &lt;/p&gt;</description></item><item><title>Re: quick email- Contact Us Form - Name/Email isn't coming through  from 1st wizard step</title><link>http://forums.asp.net/thread/3274307.aspx</link><pubDate>Sat, 04 Jul 2009 06:00:16 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274307</guid><dc:creator>venkatu2005</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274307.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3274307</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;nadude:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;not sure how to set the value for the hiddenfield. the dropdown&amp;nbsp;has a&amp;nbsp;sqldatasource, and value option, but&amp;nbsp;the the hidden field doesnt...&amp;nbsp;so just using the&amp;nbsp;drop down list&amp;nbsp;option for now&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;To set the dropdownlist to hiddenfield like this&lt;/p&gt;&lt;p&gt;HiddenField1.Value=Dropdownlist1.SelectedValue;&lt;/p&gt;&lt;p&gt;Let me know where you want to hide or disable the Dropdownlist ie: on which page and what the reason to disable..&lt;/p&gt;&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;nadude:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;Dim Body1 As String = &amp;quot;Hi, you&amp;#39;ve recieved a new message on &amp;lt;a href=&amp;quot;http://www.servername.com/Members/Messages.aspx&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;&amp;nbsp;Site &amp;lt;/a&amp;gt;&amp;nbsp;, please login and check your messages.&amp;quot;&lt;br /&gt;Line 36:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mail.Body = Body1&lt;br /&gt;Line 37:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mail.IsBodyHtml = True&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;Try this&lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="vb.net"&gt;Dim Body1 As String = &amp;quot;Hi, you&amp;#39;ve recieved a new message on &amp;lt;a href=&amp;#39;http://www.servername.com/Members/Messages.aspx&amp;#39; target=&amp;#39;_blank&amp;#39;&amp;gt; Site &amp;lt;/a&amp;gt; , please login and check your messages.&amp;quot;&lt;/pre&gt;&lt;br /&gt; &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: quick email- Contact Us Form - Name/Email isn't coming through  from 1st wizard step</title><link>http://forums.asp.net/thread/3273563.aspx</link><pubDate>Fri, 03 Jul 2009 13:11:40 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3273563</guid><dc:creator>nadude</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3273563.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3273563</wfw:commentRss><description>&lt;p&gt;not sure how to set the value for the hiddenfield. the dropdown&amp;nbsp;has a&amp;nbsp;sqldatasource, and value option, but&amp;nbsp;the the hidden field doesnt...&amp;nbsp;so just using the&amp;nbsp;drop down list&amp;nbsp;option for now... &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;as for the embedding the&amp;nbsp;anchor link, it gives a compilation error, end of statement expected, and the source error&amp;nbsp;is: &lt;/p&gt;
&lt;p&gt;&amp;nbsp;Dim Body1 As String = &amp;quot;Hi, you&amp;#39;ve recieved a new message on &amp;lt;a href=&amp;quot;http://www.servername.com/Members/Messages.aspx&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;&amp;nbsp;Site &amp;lt;/a&amp;gt;&amp;nbsp;, please login and check your messages.&amp;quot;&lt;br /&gt;Line 36:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mail.Body = Body1&lt;br /&gt;Line 37:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mail.IsBodyHtml = True&lt;/p&gt;</description></item><item><title>Re: quick email- Contact Us Form - Name/Email isn't coming through  from 1st wizard step</title><link>http://forums.asp.net/thread/3273437.aspx</link><pubDate>Fri, 03 Jul 2009 11:53:17 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3273437</guid><dc:creator>venkatu2005</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3273437.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3273437</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;nadude:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;do you know which control i could use to load such a field on a page,but hide it from the users? so that it can have a id.selectedvalue ? &lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;for this pass the selectedvalue to hiddenfield so its default not visible to user so you can call hidden field as &lt;b&gt;Hiddenfield1.Value&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;nadude:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; body string - &amp;quot;you&amp;#39;ve recieved a new message on mysite, please login and check your messages.&amp;quot; how can I add an html url link to it so that MYSITE is a link? &lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;for this add the anchor tag redirect you website&lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="xhtml"&gt;&amp;lt;a href=&amp;quot;http://www.servername.com/Login.aspx&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt; Login Here &amp;lt;/a&amp;gt;&lt;/pre&gt;&lt;br /&gt; &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: quick email- Contact Us Form - Name/Email isn't coming through  from 1st wizard step</title><link>http://forums.asp.net/thread/3273423.aspx</link><pubDate>Fri, 03 Jul 2009 11:45:19 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3273423</guid><dc:creator>nadude</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3273423.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3273423</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;woooooooooohooooooooooooooooooo got it to work beautifully, thank you soooooooooooo much!!! just needed the .selectedvalue stuff... heres is the code&lt;/p&gt;&lt;pre class="vb.net" name="code"&gt;Dim mail As MailMessage = New MailMessage()
        mail.[To].Add(DropDownList1.SelectedValue)
        mail.From = New MailAddress(&amp;quot;myusername@gmail.com&amp;quot;)
        mail.Subject = &amp;quot;New message recieved &amp;quot;

        Dim Body1 As String = &amp;quot;Hi, you&amp;#39;ve recieved a new message on MYSITE, please login and check your messages.&amp;quot;
        mail.Body = Body1
        mail.IsBodyHtml = True
        Dim smtp As SmtpClient = New SmtpClient()
        smtp.EnableSsl = True
        smtp.Send(mail)&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i can&amp;#39;t change the value of the username drop down to email, because i use the value of their username to send them a message in their database table. so i have to use another control to bring their email address , for now i made the email address visible. &lt;/p&gt;
&lt;p&gt;i had also put visible=false for the dropdownlist1, because i dont want users to see the email addresses of other users. do you know which control i could use to load such a field on a page,but hide it from the users? so that it can have a id.selectedvalue ? &lt;/p&gt;
&lt;p&gt;and one last super quick question.... the body string - &amp;quot;you&amp;#39;ve recieved a new message on mysite, please login and check your messages.&amp;quot; how can I add an html url link to it so that MYSITE is a link? &lt;/p&gt;</description></item><item><title>Re: quick email- Contact Us Form - Name/Email isn't coming through  from 1st wizard step</title><link>http://forums.asp.net/thread/3273382.aspx</link><pubDate>Fri, 03 Jul 2009 11:22:03 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3273382</guid><dc:creator>venkatu2005</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3273382.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3273382</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;nadude:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;1. since my gmail username and password are already in web.config,&amp;nbsp;do i have to include them above like&amp;nbsp;in your code? cant i just&amp;nbsp;exclude those parts? &lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;If you specify the&lt;b&gt; username , password on your web.config&lt;/b&gt; file there is &lt;i&gt;no need to provide in the code .&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;nadude:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;2. on another page, i have a create message form, where one user can send another user a message&amp;nbsp;(a db table), referenced by username... when they&amp;nbsp;select a to username, i&amp;nbsp;access the&amp;nbsp;to users email address in a&amp;nbsp;unvisible drop down list by sql. &lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;Here first you are bind the username to Dropdownlist at the time Bind the Username to DataTextField and Email to DataValueField so when the user choose the username &lt;/p&gt;&lt;p&gt;using&lt;b&gt; Dropdownlist1.SelectedValue you can get his emailID&amp;nbsp; &lt;/b&gt;then as usual pass the ID to To Address follow as like above &lt;/p&gt;&lt;p&gt;Suppose, if you are binding only the username to Dropdownlist for both Datavaluefield and DataTextfield , at this time you have to retrieve the user emailID by using the username ie:on DropdownlistSelectedIndex_Changed Event or sumbit event then as do .&lt;/p&gt;&lt;p&gt;If you have any query let me know..&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: quick email- Contact Us Form - Name/Email isn't coming through  from 1st wizard step</title><link>http://forums.asp.net/thread/3273367.aspx</link><pubDate>Fri, 03 Jul 2009 11:10:29 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3273367</guid><dc:creator>nadude</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3273367.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3273367</wfw:commentRss><description>&lt;p&gt;thanks,&amp;nbsp;that looks great, and i&amp;#39;ll&amp;nbsp;save a reference to it for use later... for now i need to move on to add other functions, also regarding email... have two questions.. &lt;/p&gt;
&lt;p&gt;1. since my gmail username and password are already in web.config,&amp;nbsp;do i have to include them above like&amp;nbsp;in your code? cant i just&amp;nbsp;exclude those parts? &lt;/p&gt;
&lt;p&gt;2. on another page, i have a create message form, where one user can send another user a message&amp;nbsp;(a db table), referenced by username... when they&amp;nbsp;select a to username, i&amp;nbsp;access the&amp;nbsp;to users email address in a&amp;nbsp;unvisible drop down list by sql. &lt;/p&gt;
&lt;p&gt;how can i change the above code, to use&amp;nbsp;the variable&amp;nbsp;id &amp;quot;DropDownList1&amp;quot;&amp;nbsp;from teh page, to select the to: email address? &amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: quick email- Contact Us Form - Name/Email isn't coming through  from 1st wizard step</title><link>http://forums.asp.net/thread/3270273.aspx</link><pubDate>Thu, 02 Jul 2009 04:24:27 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3270273</guid><dc:creator>venkatu2005</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3270273.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3270273</wfw:commentRss><description>&lt;p&gt;see this is my samle here i am concatenate the email,name message to Mail.Body&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="vb.net"&gt;Imports System.Net.Mail

Protected  Sub Button1_Click
(ByVal sender As Object, ByVal e As EventArgs)
Dim mail As MailMessage =  New MailMessage()
mail.To.Add(admin@gmail.com&amp;quot;)
mail.From = New MailAddress(admin@gmail.com&amp;quot;)
mail.Subject = &amp;quot;Email using Gmail server &amp;quot;

dim  Body as string = &amp;quot;Hi, this mail is to test sending mail&amp;quot; &amp;amp;
             &amp;quot;using Gmail in ASP.NET using vb.Net&amp;quot; &amp;amp; &amp;quot; Your email is &amp;quot; &amp;amp; txtEmail.Text &amp;amp;&amp;quot;&amp;lt;br/&amp;gt;Your name&amp;quot; &amp;amp; txtName.Text &amp;amp; &amp;quot;&amp;lt;br/&amp;gt; Yor Message &amp;quot; &amp;amp; txtMessage.Text
mail.Body = Body

mail.IsBodyHtml = True
Dim smtp As SmtpClient =  New SmtpClient()
smtp.Host = &amp;quot;smtp.gmail.com&amp;quot;
smtp.Credentials = New System.Net.NetworkCredential
    (&amp;quot;YourUserName@gmail.com&amp;quot;,&amp;quot;YourGmailPassword&amp;quot;)
smtp.EnableSsl = True
smtp.Send(mail)
End Sub&lt;/pre&gt;&lt;br /&gt; &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: quick email- Contact Us Form - Name/Email isn't coming through  from 1st wizard step</title><link>http://forums.asp.net/thread/3269729.aspx</link><pubDate>Wed, 01 Jul 2009 19:36:37 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3269729</guid><dc:creator>nadude</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3269729.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3269729</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;venkatu2005:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;You have to specify Explicitly Name / Email Address of the user and Message etc.. all should be concatenated to Mail Body .&lt;br /&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry, I&amp;#39;ve no clue how to code to concatenate that stuff into the Mail Body. I&amp;#39;ve got them in three variable id&amp;#39;s txtEmail, txtName and txtMessage. I&amp;#39;m using vb, how do i concatenate those three into one?&lt;/p&gt;</description></item><item><title>Re: quick email- Contact Us Form - Name/Email isn't coming through  from 1st wizard step</title><link>http://forums.asp.net/thread/3263679.aspx</link><pubDate>Mon, 29 Jun 2009 09:02:21 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3263679</guid><dc:creator>venkatu2005</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3263679.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3263679</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;nadude:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Lets say the gmail address for the site &lt;a href="mailto:sitealert@gmail.com"&gt;sitealert@gmail.com&lt;/a&gt;. when the email comes to me, it comes as from &lt;a href="mailto:sitealert@gmail.com"&gt;sitealert@gmail.com&lt;/a&gt;, and has the message, but not the name/email address of the user who sent the message from teh contact us wizard. &lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;You have to specify Explicitly Name / Email Address of the user and Message etc.. all should be concatenated to Mail Body .&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: quick email- Contact Us Form - Name/Email isn't coming through  from 1st wizard step</title><link>http://forums.asp.net/thread/3263620.aspx</link><pubDate>Mon, 29 Jun 2009 08:35:45 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3263620</guid><dc:creator>nadude</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3263620.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3263620</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi guys, thanks for your replies. Just to make it clear I do recieve the email, I have configured my web.config file with some smtp code related to gmail. I have set up an account for the site, and stuck the username and password there. So all emails from the site system come from one gmail account. &lt;/p&gt;
&lt;p&gt;Lets say the gmail address for the site &lt;a href="mailto:sitealert@gmail.com"&gt;sitealert@gmail.com&lt;/a&gt;. when the email comes to me, it comes as from &lt;a href="mailto:sitealert@gmail.com"&gt;sitealert@gmail.com&lt;/a&gt;, and has the message, but not the name/email address of the user who sent the message from teh contact us wizard. &lt;/p&gt;
&lt;p&gt;i want the same gmail account used, but i want the&amp;nbsp;custom name/email address options to be included in the email i recieve from &lt;a href="mailto:sitealert@gmail.com"&gt;sitealert@gmail.com&lt;/a&gt; . They can be in the subject or in the body, but i need them. &lt;/p&gt;
&lt;p&gt;Don&amp;#39;t worry if you can&amp;#39;t solve this problem, for now I just got rid of the name/email parts of the form, and put a message next to the body textbox saying if you want a reply remember to include your name and email address... temp work around for now... &lt;/p&gt;</description></item><item><title>Re: quick email- Contact Us Form - Name/Email isn't coming through  from 1st wizard step</title><link>http://forums.asp.net/thread/3263210.aspx</link><pubDate>Mon, 29 Jun 2009 04:50:48 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3263210</guid><dc:creator>venkatu2005</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3263210.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3263210</wfw:commentRss><description>&lt;p&gt;Could you make clear ?&amp;nbsp; you mean you didnt get the email check it pls&lt;/p&gt;&lt;p&gt;&lt;a target="_blank" href="http://venkat-dotnetsamples.blogspot.com/2009/06/send-email-using-vbnet.html"&gt;http://venkat-dotnetsamples.blogspot.com/2009/06/send-email-using-vbnet.html&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: quick email- Contact Us Form - Name/Email isn't coming through  from 1st wizard step</title><link>http://forums.asp.net/thread/3262768.aspx</link><pubDate>Sun, 28 Jun 2009 17:33:28 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3262768</guid><dc:creator>whighfield</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3262768.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3262768</wfw:commentRss><description>&lt;p&gt;Gmail does not use a standard SSL port so you need to set that, also there is an issue with&amp;nbsp;the .NET SMTP client&amp;nbsp;and sending over SSL and credentials see the following article, it will point you in the correct direction&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.codeproject.com/KB/aspnet/aspnetemailusinggmail.aspx"&gt;http://www.codeproject.com/KB/aspnet/aspnetemailusinggmail.aspx&lt;/a&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>quick email- Contact Us Form - Name/Email isn't coming through  from 1st wizard step</title><link>http://forums.asp.net/thread/3262478.aspx</link><pubDate>Sun, 28 Jun 2009 11:42:53 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3262478</guid><dc:creator>nadude</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3262478.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3262478</wfw:commentRss><description>&lt;p&gt;Using VWD08, and asp.net 3.5 vb. &lt;/p&gt;
&lt;p&gt;I have&amp;nbsp;a contact us form &amp;nbsp;on a page, done through a wizard. (Followed the steps of a video tutorial on asp.net). Then added some code for using gmail/smtp.&lt;/p&gt;
&lt;p&gt;The wizards first step has two text boxes which request users name and address (txtName and txtEmail). Then the second page, before complete which triggers a finish button click to send mail. Second page has a text box again with the body of the message (txtMessage). &lt;/p&gt;
&lt;p&gt;When i recieve the email, the body comes through, but there is no sign of the name or email. Any ideas on whats going wrong? Not used to VB, so I know its probably just a tiny bit of code missing. I tried a bunch of googling, searching and trying to hack vb code to join the textbox values at the least, couldnt get it done... Would really appreciate if anyone points out whats wrong... ? &lt;/p&gt;
&lt;p&gt;Maybe its because of gmail smtp, i cant put a from email address other than the account being used. In that case can someone give me how to connect the three txtbox values with space inbetween, so i make that the updated txtBody, then it will be in the email ? I don&amp;#39;t know... HELP PLEAAASE :)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is my script: &lt;/p&gt;&lt;pre class="vb.net" name="code"&gt;&amp;lt;%@ Page Title=&amp;quot;Contact Us&amp;quot; Language=&amp;quot;VB&amp;quot; MasterPageFile=&amp;quot;~/LayoutMasterPage.master&amp;quot; %&amp;gt;

&amp;lt;%@ Import Namespace=&amp;quot;System.Net.Mail&amp;quot; %&amp;gt;

&amp;lt;script runat=&amp;quot;server&amp;quot;&amp;gt;

    Protected Sub wzContact_FinishButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs)
               
        SendMail(from:=txtEmail.Text, body:=txtMessage.Text)
        
    End Sub
        
    
    Private Sub SendMail(ByVal from As String, ByVal body As String)
        Dim mailServerName As String = &amp;quot;smtp.gmail.com&amp;quot;
        Dim message As MailMessage = New MailMessage(from, &amp;quot;myemailaddress@gmail.com&amp;quot;, &amp;quot;Feedback from Website&amp;quot;, body)
        Dim mailClient As SmtpClient = New SmtpClient
        
        
        mailClient.Host = mailServerName
        mailClient.EnableSsl = True
        mailClient.Send(message)
        message.Dispose()
    End Sub
    
&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;pre class="vb.net" name="code"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="vb.net" name="code"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="vb.net" name="code"&gt;And this is the wizard steps: &lt;/pre&gt;&lt;pre class="vb.net" name="code"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="vb.net" name="code"&gt;&lt;pre class="vb.net:collapse" name="code"&gt;&amp;lt;asp:Wizard ID=&amp;quot;wzContact&amp;quot; runat=&amp;quot;server&amp;quot; ActiveStepIndex=&amp;quot;0&amp;quot; Width=&amp;quot;700px&amp;quot; 
                Height=&amp;quot;300px&amp;quot; CellPadding=&amp;quot;20&amp;quot; 
                onfinishbuttonclick=&amp;quot;wzContact_FinishButtonClick&amp;quot;&amp;gt;
            &amp;lt;StepStyle VerticalAlign=&amp;quot;Top&amp;quot; /&amp;gt;
            &amp;lt;WizardSteps&amp;gt;
                &amp;lt;asp:WizardStep runat=&amp;quot;server&amp;quot; Title=&amp;quot;Contact Info&amp;quot;&amp;gt;
                    &amp;lt;table cellpadding=&amp;quot;10&amp;quot; class=&amp;quot;style1&amp;quot;&amp;gt;
                        &amp;lt;tr&amp;gt;
                            &amp;lt;td&amp;gt;
                                Your Name&amp;lt;/td&amp;gt;
                            &amp;lt;td&amp;gt;
                                &amp;lt;asp:TextBox ID=&amp;quot;txtName&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;
                                &amp;lt;asp:RequiredFieldValidator ID=&amp;quot;RequiredFieldValidator1&amp;quot; runat=&amp;quot;server&amp;quot; 
                                    ControlToValidate=&amp;quot;txtName&amp;quot; ErrorMessage=&amp;quot;Please enter your name&amp;quot;&amp;gt;*&amp;lt;/asp:RequiredFieldValidator&amp;gt;
                            &amp;lt;/td&amp;gt;
                        &amp;lt;/tr&amp;gt;
                        &amp;lt;tr&amp;gt;
                            &amp;lt;td&amp;gt;
                                Email&amp;lt;/td&amp;gt;
                            &amp;lt;td&amp;gt;
                                &amp;lt;asp:TextBox ID=&amp;quot;txtEmail&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;
                                &amp;lt;asp:RequiredFieldValidator ID=&amp;quot;RequiredFieldValidator2&amp;quot; runat=&amp;quot;server&amp;quot; 
                                    ControlToValidate=&amp;quot;txtEmail&amp;quot; ErrorMessage=&amp;quot;Please enter your email address&amp;quot;&amp;gt;*&amp;lt;/asp:RequiredFieldValidator&amp;gt;
                                &amp;lt;asp:RegularExpressionValidator ID=&amp;quot;RegularExpressionValidator1&amp;quot; runat=&amp;quot;server&amp;quot; 
                                    ControlToValidate=&amp;quot;txtEmail&amp;quot; 
                                    ErrorMessage=&amp;quot;Please enter a valid email address (user@domain.com)&amp;quot; 
                                    ValidationExpression=&amp;quot;\w+([-+.&amp;#39;]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*&amp;quot;&amp;gt;*&amp;lt;/asp:RegularExpressionValidator&amp;gt;
                            &amp;lt;/td&amp;gt;
                        &amp;lt;/tr&amp;gt;
                        &amp;lt;tr&amp;gt;
                            &amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;
                                &amp;lt;asp:ValidationSummary ID=&amp;quot;ValidationSummary1&amp;quot; runat=&amp;quot;server&amp;quot; /&amp;gt;
                            &amp;lt;/td&amp;gt;
                        &amp;lt;/tr&amp;gt;
                    &amp;lt;/table&amp;gt;
                &amp;lt;/asp:WizardStep&amp;gt;
                
                &amp;lt;asp:WizardStep runat=&amp;quot;server&amp;quot; StepType=&amp;quot;Finish&amp;quot; Title=&amp;quot;Message&amp;quot;&amp;gt;
                    &amp;lt;table cellpadding=&amp;quot;10&amp;quot; class=&amp;quot;style1&amp;quot;&amp;gt;
                        &amp;lt;tr&amp;gt;
                            &amp;lt;td align=&amp;quot;left&amp;quot; class=&amp;quot;style2&amp;quot; valign=&amp;quot;top&amp;quot;&amp;gt;
                                Message&amp;lt;/td&amp;gt;
                            &amp;lt;td class=&amp;quot;style3&amp;quot;&amp;gt;
                                &amp;lt;asp:TextBox ID=&amp;quot;txtMessage&amp;quot; runat=&amp;quot;server&amp;quot; TextMode=&amp;quot;MultiLine&amp;quot; Height=&amp;quot;80%&amp;quot; 
                                    Width=&amp;quot;80%&amp;quot; ToolTip=&amp;quot;Prototype error: Repeat email and name please&amp;quot;&amp;gt;Prototype error: Please reenter email and name here.&amp;lt;/asp:TextBox&amp;gt;
                                &amp;lt;asp:RequiredFieldValidator ID=&amp;quot;RequiredFieldValidator3&amp;quot; runat=&amp;quot;server&amp;quot; 
                                    ControlToValidate=&amp;quot;txtMessage&amp;quot; ErrorMessage=&amp;quot;Please type your message&amp;quot;&amp;gt;*&amp;lt;/asp:RequiredFieldValidator&amp;gt;
                            &amp;lt;/td&amp;gt;
                        &amp;lt;/tr&amp;gt;
                        &amp;lt;tr&amp;gt;
                            &amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;
                                &amp;lt;asp:ValidationSummary ID=&amp;quot;ValidationSummary2&amp;quot; runat=&amp;quot;server&amp;quot; /&amp;gt;
                            &amp;lt;/td&amp;gt;
                        &amp;lt;/tr&amp;gt;
                    &amp;lt;/table&amp;gt;
                &amp;lt;/asp:WizardStep&amp;gt;
                &amp;lt;asp:WizardStep runat=&amp;quot;server&amp;quot; StepType=&amp;quot;Complete&amp;quot; Title=&amp;quot;Complete&amp;quot;&amp;gt;
                    &amp;lt;table cellpadding=&amp;quot;10&amp;quot; class=&amp;quot;style1&amp;quot;&amp;gt;
                    &amp;lt;tr&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot; valign=&amp;quot;middle&amp;quot;&amp;gt;Thank you, your message has been sent.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
                    &amp;lt;/table&amp;gt;
                
                &amp;lt;/asp:WizardStep&amp;gt;
            &amp;lt;/WizardSteps&amp;gt;
            &amp;lt;SideBarStyle HorizontalAlign=&amp;quot;Left&amp;quot; VerticalAlign=&amp;quot;Top&amp;quot; Width=&amp;quot;100px&amp;quot; /&amp;gt;
        &amp;lt;/asp:Wizard&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>