p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning ASP.NET 4.5 : in C# and VB (http://p2p.wrox.com/forumdisplay.php?f=710)
-   -   Ch 9 - submitting the email (http://p2p.wrox.com/showthread.php?t=92052)

AlanWheeler January 27th, 2014 12:27 PM

Ch 9 - submitting the email
 
Hi Imar,

I successfully finished Ch 9 and was able to transmit the email just as your text guided. Terrific! Thanks.

One thing I didn't see in the book, and maybe I missed it, but the Contact Us form disappears after 'Send' is clicked. The "Message Sent" Label is displayed, but it is right up next to the breadcrumb trail. I presume I can simply add some <br /> elements to move the "Message Sent" Label down, but what would be the best or recommended way to keep the form and its content visible. I think there's a lot of options. Or, maybe it's not recommended to do that?

Onward to Ajax...

Thanks.

Best Regards,
Alan

AlanWheeler January 27th, 2014 12:39 PM

Got the form to display but should I or not
 
Hi,

Sorry for the short-sighted question. I changed the last line in the VB code for the "Send" button click to be FormTable.Visible = True and the form is there. I had copied that code from your files and read every line except that one.

But that still begs the question, is there a reason you suggested .Visible False?

Thanks.

Best Regards,
Alan

Imar January 27th, 2014 02:55 PM

>> But that still begs the question, is there a reason you suggested .Visible False?

Yes, you typically want to hide the form after a successful postback because a) this will help the user understand the form was submitted successfully, and b) it prevents them from (accidentally or deliberately) submit the form multiple times. If you need to keep the form visible just don't change it's Visible property as it's visible by default.

Quote:

I presume I can simply add some <br /> elements to move the "Message Sent" Label down,
Yes, that would work, or you can put it in a <div> which causes it to flow to the next line automatically.

Cheers,

Imar


All times are GMT -4. The time now is 01:43 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.