Get details error msg through email

Posted by Venkat | Labels:

Here we discuss how to get the html errormessage ie: yellow asp.net error message ie: show on stack trace if any error occurs in our project so we have to pass this msg to user through email.

we just get that Asp.net yellow error msg

this is the code

Exception err = Server.GetLastError();
Response.Clear();
HttpUnhandledException httpUnhEx = err as HttpUnhandledException;
if (httpUnhEx != null)
{
Response.Write("<h1>ASP.NET Error Page:
\n"+ httpUnhEx.GetHtmlErrorMessage());
}

how to pass if condition through the inline HTML Code

Posted by Venkat | Labels: ,

Here is the code we are passing the if condition through inline code..

ex:

Visible='<%# IIf((((Eval("productsize")).ToString().Length > 0) OrElse (Decimal.Parse(Eval("productsize
")) <= 0)), "true", "false") %>'

instead of using some function or procedure or by writing code on Gridview_Rowdatabound
just we simple pass the condition to make the control visible True or flase

PayOffers.in