Is there a way to get the value on the dropdown list to send email that was selected on the dropdown list using appsetting?
Im done sending email that was on the web.config.
Here's my example to send email using the appsetting that was already on the web.config
<pre><add key="EmailSender" value="Sender@gmail.com"/>
<pre><add key="EmailReceiver" value="Receiver@gmail.com"/>
<pre><add key="EmailReceiver2" value="Receiver2@gmail.com"/>
What I have tried:
And now i want to get the email address that was on the dropdown list from the other page to send email and here's the dropdownlist.
<pre><asp:DropDownList runat="server" ID="ddlEmail" Height="30px" Width="270px">
<asp:ListItem Selected="True">-- Select Email --</asp:ListItem>
<asp:ListItem>Sample@gmail.com</asp:ListItem> //Sample Email
<asp:ListItem>Sample1@gmail.com</asp:ListItem> //Sample Email
<asp:ListItem>Sample2@gmail.com</asp:ListItem> //Sample Email
<asp:ListItem>Sample3@gmail.com</asp:ListItem> //Sample Email
<asp:ListItem>Sample4@gmail.com</asp:ListItem> //Sample Email
<asp:ListItem>Sample5@gmail.com</asp:ListItem> //Sample Email
</asp:DropDownList>
and i have a class to get the value of the email.
email.From = new MailAddress(ConfigurationManager.AppSettings["EmailSender"]);
guys can you help me to get the value that was on the dropdown list using the appsetting? Thanks in advance