D
David Lozzi
Howdy,
A little background, using asp.net 2.0, i'm using a wizard object to create
a email interface for a user to email out their clientele, about 200 or so,
depending on the selection. The first step in the wizard is the email
selection, so it lists all the email accounts and distribution lists the
system has for the user, the user can select lists and/or individuals. I
then read through it all and throw it into an arraylist as a mailaddress
object. The next step in the wizard gives options of whether or not its
displays the selected recipients (including the ones in the lists), format
HTML vs Plain text, BCC the sender, etc. So I loop through all of the
selected emails in my arraylist to display which recipients the user is
emailing to. Here lies my issue.
I need the previously loaded arraylist of selected email addresses to still
be available. The only way i know how to do that is either throw it into a
session variable or the viewstate, both of which requires the class to be
serializable, which MailAddress isn't. I looked into Inheriting and trying
that but I got nowhere fast with that:
<Serializable()> Public Class MailAddress1
Inherits MailAddress
Public Sub New(ByVal email As String, ByVal display As String)
MyBase.New(email, display)
End Sub
End Class
I tried overriding the New sub but it wouldn't let me. So I instead moved
the collecting of email addresses to when the user presses Send. And i do a
lighter collection of the email addresses to a string for displaying their
selected recipients.
SO
I would like to only collect the email addresses once and use the same
arraylist multiple times, on multiple postbacks. Is this possible? I thought
about creating a new class to hold the email address, then transfer them
from my class to the mailaddress class when going to send, but that didnt
make much sens to me to do.
Thanks!!!
A little background, using asp.net 2.0, i'm using a wizard object to create
a email interface for a user to email out their clientele, about 200 or so,
depending on the selection. The first step in the wizard is the email
selection, so it lists all the email accounts and distribution lists the
system has for the user, the user can select lists and/or individuals. I
then read through it all and throw it into an arraylist as a mailaddress
object. The next step in the wizard gives options of whether or not its
displays the selected recipients (including the ones in the lists), format
HTML vs Plain text, BCC the sender, etc. So I loop through all of the
selected emails in my arraylist to display which recipients the user is
emailing to. Here lies my issue.
I need the previously loaded arraylist of selected email addresses to still
be available. The only way i know how to do that is either throw it into a
session variable or the viewstate, both of which requires the class to be
serializable, which MailAddress isn't. I looked into Inheriting and trying
that but I got nowhere fast with that:
<Serializable()> Public Class MailAddress1
Inherits MailAddress
Public Sub New(ByVal email As String, ByVal display As String)
MyBase.New(email, display)
End Sub
End Class
I tried overriding the New sub but it wouldn't let me. So I instead moved
the collecting of email addresses to when the user presses Send. And i do a
lighter collection of the email addresses to a string for displaying their
selected recipients.
SO
I would like to only collect the email addresses once and use the same
arraylist multiple times, on multiple postbacks. Is this possible? I thought
about creating a new class to hold the email address, then transfer them
from my class to the mailaddress class when going to send, but that didnt
make much sens to me to do.
Thanks!!!