The last two lines of code in the Click event of a Button Control on my page
are:
Me.WelcomeEmail()
Response.Redirect("mainmenu.aspx")
The last line of code in Me.WelcomeEmail() is:
Mail.SmtpMail.Send(mailmsg)
When the Click event is triggered, all of the code in Me.WelcomeEmail() is
successfully executed, and the email is successfully sent, but the
Response.Redirect("mainmenu.aspx") line is not executed, and a blank page is
displayed with the URL of the page that this code is run from. However, if I
use Server.Transfer instead as follows:
Me.WelcomeEmail()
Server.Transfer("mainmenu.aspx")
Response.Redirect("mainmenu.aspx") 'This line obviously won't get executed
here because Server.Transfer is executed first
The Server.Transfer line does get executed, and I see the page
mainmenu.aspx. However, I do not want this because I want the displayed URL
to match the displayed page, which is not true when using Server.Transfer.
Why is Response.Redirect not working here, and what can I do to fix it?
Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/