Author: stevebo | Posted on: 12/12/2009 1:35:37 AM | Views : 273

I'm sorry for such a simple question with seemingly no answer, but I've spent 4 hours trying to figure out why my button click won't fire.  I set a breakpoint on the msg.From line, but it never gets fired.  Is there some set of conditions with AutoPostBack and ViewState that I'm not seeing? 



Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim msg As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage()

        msg.From = New System.Net.Mail.MailAddress("steve@FPING.com")
        ....

end Sub


<asp:Button ID="Button1" runat="server" Text="Sign me up!" OnClick="Button1_Click" PostBackUrl="~/pay.aspx" />
    </asp:Ta ...

Go to the complete details ...