Answered by:
How to send ListView's data to member email

Question
-
User-1166428634 posted
Hi All,
I am displaying a list where Members information displays accoding to there requirement. Search it working fine. What I want to send the searched data to Members email automatically [as per there requirment]. I do not understand how to send displayed data from ListView via email.
Thanks
Saturday, October 19, 2013 10:02 AM
Answers
-
User-933407369 posted
hi Silverlight,
if you use the method below, then it is not easy to send the searched data to Members email automatically [as per there requirment].
<a href='mailto:<%# DataBinder.Eval(Container.DataItem, "Email")%>'>click</a><br />
I suggest you to add a button control , seems like below:
<ItemTemplate><br /> <asp:Button ID="btnSend" CommandName="SendEmail" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "ID")%>' runat="server" Text="SendEmail" OnClick="btnSend_Click" /> .... </ItemTemplate>
And then you can write your code to send the searched data to Members email automatically [as per there requirment].
protected void btnSend_Click(object sender, EventArgs e) { //send the searched data to Members email automatically [as per there requirment] //get members information displays accoding to there requirement //.... //send mail , you can search on google or bing }
i hope it helps you.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, October 21, 2013 5:00 AM -
User-1166428634 posted
Actually using your code everytime my MS-Outlook was opening... and mine outlook is not configured. But thanks for reply.
I found the solution here :
http://www.aspdotnet-suresh.com/2012/09/how-to-send-gridview-in-email-body-in.html
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, October 23, 2013 12:33 AM
All replies
-
User-933407369 posted
hi Silverlight,
if you use the method below, then it is not easy to send the searched data to Members email automatically [as per there requirment].
<a href='mailto:<%# DataBinder.Eval(Container.DataItem, "Email")%>'>click</a><br />
I suggest you to add a button control , seems like below:
<ItemTemplate><br /> <asp:Button ID="btnSend" CommandName="SendEmail" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "ID")%>' runat="server" Text="SendEmail" OnClick="btnSend_Click" /> .... </ItemTemplate>
And then you can write your code to send the searched data to Members email automatically [as per there requirment].
protected void btnSend_Click(object sender, EventArgs e) { //send the searched data to Members email automatically [as per there requirment] //get members information displays accoding to there requirement //.... //send mail , you can search on google or bing }
i hope it helps you.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, October 21, 2013 5:00 AM -
User-1166428634 posted
Actually using your code everytime my MS-Outlook was opening... and mine outlook is not configured. But thanks for reply.
I found the solution here :
http://www.aspdotnet-suresh.com/2012/09/how-to-send-gridview-in-email-body-in.html
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, October 23, 2013 12:33 AM