I am retrieving the email id of the user in SqlDataSource and want to send an email to this email ID. Below is the code for the SQL Data Source.
<asp:SqlDataSource ID="UserDetailsSqlDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:UserDetailsConnectionString %>"
SelectCommand="SELECT [LoweredEmail] FROM [vw_aspnet_MembershipUsers] WHERE ([UserName] = @UserName)">
<SelectParameters>
<asp:CookieParameter CookieName="userName" Name="UserName" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
Below is the code for sending the email.
MailMessage mail = new MailMessage();
mail.To.Add();
I am not getting how to get the email id retrieved in mail.To.Add();