Click here to Skip to main content
15,896,915 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to submit a record and send as an email attachment at once? Pin
ZurdoDev26-Oct-16 9:49
professionalZurdoDev26-Oct-16 9:49 
GeneralRe: How to submit a record and send as an email attachment at once? Pin
samflex26-Oct-16 10:34
samflex26-Oct-16 10:34 
AnswerRe: How to submit a record and send as an email attachment at once? Pin
ZurdoDev26-Oct-16 11:49
professionalZurdoDev26-Oct-16 11:49 
GeneralRe: How to submit a record and send as an email attachment at once? Pin
samflex26-Oct-16 15:32
samflex26-Oct-16 15:32 
GeneralRe: How to submit a record and send as an email attachment at once? Pin
ZurdoDev26-Oct-16 15:42
professionalZurdoDev26-Oct-16 15:42 
AnswerRe: How to submit a record and send as an email attachment at once? Pin
jkirkerx26-Oct-16 13:33
professionaljkirkerx26-Oct-16 13:33 
GeneralRe: How to submit a record and send as an email attachment at once? Pin
samflex26-Oct-16 15:41
samflex26-Oct-16 15:41 
GeneralRe: How to submit a record and send as an email attachment at once? Pin
jkirkerx27-Oct-16 7:06
professionaljkirkerx27-Oct-16 7:06 
samflex wrote:
What is so complicated about asking how to save records to the db and generate and send a pdf attachment via email?

I was a beginner like you years ago and I got lots of help from the crew here at Code Project. I'll be honest, answering questions like yours is hard because I have no clue what version of .net your using and the level of detail your looking for because I have no history of your work, gained from looking at your code examples.

As far as your thoughts go on 1,2,3 I find it not efficient.
I use MVC and lots of models which are classes. Once you populate a class to hold your data, you just use that class over and over. In other words,
  1. you send the class to a function to write the data,
  2. then send the class to a function to generate your pdf,
  3. then send the class to a function to send the email.
Writing the data and reading it back is a waste of time, and can result in a long wait for the database server to finish. Writes take longer than reads.

Now you can get real fancy and efficient here with .Net 4.5+
You can say or think,
Task, Async
while the database write occurs, I will task creating the PDF,
I will wait for 1 and 2 to complete and send the email in the background and return control to the user.
GeneralRe: How to submit a record and send as an email attachment at once? Pin
samflex27-Oct-16 8:12
samflex27-Oct-16 8:12 
GeneralRe: How to submit a record and send as an email attachment at once? Pin
jkirkerx27-Oct-16 11:36
professionaljkirkerx27-Oct-16 11:36 
GeneralRe: How to submit a record and send as an email attachment at once? Pin
samflex27-Oct-16 15:11
samflex27-Oct-16 15:11 
QuestionPOST xml request to an API with feedback asp.net mvc Pin
MacroSss21-Oct-16 0:11
MacroSss21-Oct-16 0:11 
AnswerRe: POST xml request to an API with feedback asp.net mvc Pin
jkirkerx24-Oct-16 9:15
professionaljkirkerx24-Oct-16 9:15 
AnswerRe: POST xml request to an API with feedback asp.net mvc Pin
MacroSss26-Oct-16 1:23
MacroSss26-Oct-16 1:23 
GeneralRe: POST xml request to an API with feedback asp.net mvc Pin
MacroSss26-Oct-16 1:24
MacroSss26-Oct-16 1:24 
QuestionThere is no ViewData item of type 'IEnumerable<SelectListItem>' that has the key 'SelectedClientList'. Pin
amioni20-Oct-16 1:43
amioni20-Oct-16 1:43 
AnswerRe: There is no ViewData item of type 'IEnumerable<SelectListItem>' that has the key 'SelectedClientList'. Pin
jkirkerx20-Oct-16 8:57
professionaljkirkerx20-Oct-16 8:57 
QuestionHow to save modal popup form into database/data table Pin
Bootzilla3319-Oct-16 10:47
Bootzilla3319-Oct-16 10:47 
AnswerRe: How to save modal popup form into database/data table Pin
Sahil Saini @ Software Developer19-Oct-16 19:23
professionalSahil Saini @ Software Developer19-Oct-16 19:23 
Questioni want fill 2 table with 1 click can I? Pin
moj197817-Oct-16 9:00
moj197817-Oct-16 9:00 
AnswerRe: i want fill 2 table with 1 click can I? Pin
Vincent Maverick Durano17-Oct-16 9:07
professionalVincent Maverick Durano17-Oct-16 9:07 
GeneralRe: i want fill 2 table with 1 click can I? Pin
moj197817-Oct-16 9:13
moj197817-Oct-16 9:13 
GeneralRe: i want fill 2 table with 1 click can I? Pin
Vincent Maverick Durano17-Oct-16 9:17
professionalVincent Maverick Durano17-Oct-16 9:17 
GeneralRe: i want fill 2 table with 1 click can I? Pin
moj197817-Oct-16 9:14
moj197817-Oct-16 9:14 
AnswerRe: i want fill 2 table with 1 click can I? Pin
Wendelius17-Oct-16 9:28
mentorWendelius17-Oct-16 9:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.