Hi,

I am building a Contact Us Email Form. My email sending part is working fine. I just want to confirm one thing with experienced programmers. Once I click the send message button, I am calling a function to send the mail. Then I get the message saying the mail has been sent. But all the text boxes in the page are still populated with values. I dont want to disable viewstate because, if there is an error in sending mail, i would like the textboxes to retain values. So the solution that i have thought out is to reset the text in all textboxes to "", if message sending has been successful. Is it a good idea or is there any better way to do this.

Thank you for your replies.

Recommended Answers

Answered by stbuchok 123 in a post from

That sounds fine, you could also just do a Response.Redirect to the same page (It's a lot less code)

Jump to Post

All 2 Replies

Yup this is good, if message is sent successfully, clear all control's values else retain them.

Member Avatar

That sounds fine, you could also just do a Response.Redirect to the same page (It's a lot less code)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.