0

Hi,

I am sending emails through webservices, I am calling the webservice from my website and passing all the arguments to it ,until now no problem.

But now I want the webservice to inform the user if an error or exception occurs is there a way by which I can do so?
Any help shall be appreciated!

Thanks
shankbond

3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by vasanth19
-1

Catch and display the error .. or mail it ..

Hi Vasanth,
I don't want to report the error by sending him a mail. Can You please provide some sample code?


Thanks

0

Please mention how the error is to be displayed. Web form or any other ?
My requirement was to display the error in webform as below :

public partial class www_sendmail : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string param = ""+Request.QueryString["param"];
        try
        {
	    if (param == "BIRTHDAY")
            {
                string fpath = Server.MapPath("");
                Wishes wish = new Wishes();
                string strStatus = wish.sendMail(fpath);
                lblRemarks.Text = strStatus;
            }
			
        }
        catch (Exception ex)
        {
            // your error by mail or text
            // wish.sendMail("....");
            lblRemarks.Text = ex.ToString();
        }
    }
}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.