guys..everytime i reload the page of Email.cshtml it by itself send a mail to my accountt..:( i used (IsPost) to correct error of sending mails bt itself bt still no correction..
what other ideas ??
Please "Marks As Answer" if any answer helped you out!
~~! FIREWALL !~~
i just added a line of code after the line WebMail.Send() . i added this line Respond.Redirect("~/Default") so that there is no prblm of user for reloading the same page with same data once again..and user is redirected to a new page..in this way if users
wants to enter data once again on his will he again goes to the page..:) that was all
Please "Marks As Answer" if any answer helped you out!
~~! FIREWALL !~~
Great, that you figured it out but what if he clicks the back button in Browser and change the data and submit again. I guess you need to have some more logic to handle these scenarios.
Afzaal.Ahmad...
Contributor
2661 Points
1040 Posts
IsPost
Aug 18, 2012 05:39 PM|LINK
guys..everytime i reload the page of Email.cshtml it by itself send a mail to my accountt..:( i used (IsPost) to correct error of sending mails bt itself bt still no correction..
what other ideas ??
~~! FIREWALL !~~
CPrakash82
All-Star
18284 Points
2841 Posts
Re: IsPost
Aug 19, 2012 03:12 AM|LINK
I guess it is very hard to understand your problem with the given description, either more explanation or code will help to help you.
Afzaal.Ahmad...
Contributor
2661 Points
1040 Posts
Re: IsPost
Aug 19, 2012 04:24 AM|LINK
Oooh c'mon it was simple :))
i just added a line of code after the line WebMail.Send() . i added this line Respond.Redirect("~/Default") so that there is no prblm of user for reloading the same page with same data once again..and user is redirected to a new page..in this way if users wants to enter data once again on his will he again goes to the page..:) that was all
~~! FIREWALL !~~
CPrakash82
All-Star
18284 Points
2841 Posts
Re: IsPost
Aug 20, 2012 12:01 AM|LINK
Great, that you figured it out but what if he clicks the back button in Browser and change the data and submit again. I guess you need to have some more logic to handle these scenarios.
Good luck.
Afzaal.Ahmad...
Contributor
2661 Points
1040 Posts
Re: IsPost
Aug 20, 2012 03:34 AM|LINK
yeah not only that. But also if he submits and re-submits !! I am just a beginner and I am trying my best to get through all! Soon or not.
~~! FIREWALL !~~