This topic is locked

Email List Option

5/8/2007 1:11:50 PM
ASPRunner.NET General questions
T
tim.hidalgo author

I was wondering if there was a simple way to include a function (button) that would allow the emailing of a list.
Example : User queries their set of data then has option to click enter email address send the list in a generic format (excel maybe)

Eugene 5/8/2007

You can try to use the following code.
System.IO.StringWriter tw = new System.IO.StringWriter();

System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(tw);
dbGrid_SHORTTABLENAME.RenderControl(hw);

string body = tw.ToString();

lib.SendMail(to, subj, body);
That's only my guess - I suppose it should help you.

T
tim.hidalgo author 5/8/2007

You can try to use the following code.

System.IO.StringWriter tw = new System.IO.StringWriter();

System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(tw);
dbGrid_SHORTTABLENAME.RenderControl(hw);

string body = tw.ToString();

lib.SendMail(to, subj, body);
That's only my guess - I suppose it should help you.


Would I be able to intput this using ASPRUNNER.NET's Events interface, or should I start looking into manually editing their generated code?

Eugene 5/8/2007

As far you wanted to create input e-mail textbox, you should edit generated code manually.

T
tim.hidalgo author 5/8/2007

As far you wanted to create input e-mail textbox, you should edit generated code manually.


Thanks, I'd hate to start butchering ASPRUNNER code if I didnt have to <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=17729&image=1&table=forumreplies' class='bbc_emoticon' alt=':lol:' />
And thanks for the replies

T
tim.hidalgo author 5/9/2007

Ok, on this subject I am having some problems with a few things.
Lets take a different example. ASPRUNNER generated the export list as 'xxx' page. Is there a way to add some code that will open up the default email editor of the users pc, attach the exported file and allow them to just fill in the blanks for to, subject and body.
If so, does anyone have an example, or link to an article I cold read. Im having some problems finding what I need.
Thanks

Eugene 5/10/2007

You are not able to create e-mail and attach file to it on user's pc.