I am experimenting around how to handle an issue with a slow SMTP server. I tried to use the .SendAsync() method of the SmtpClient. When I did this I ran into an error that upon researching can be solved by adding Async="True" to the <%@Page ..... %>.
The problem I have is that I am working in modules, controls, and ascx files that don't have the <%@ Page %> so I put it in the Default.aspx file of the DNN project. This works and allowed me to use the asynchronous function call. Although it worked, this doesn't seem right because I went into the DNN core and made a change that will be overwritten if I update DNN. I haven't seen any yet, but I am also worried about side effects on other parts of the site with this change. Does anyone know if I should expect problems?
I think I'm going about this wrong. Is there a better way to use the .SendAsync() method in modules?