/// <summary> ///incoming virtual path returns the full path of the HTML string/// </summary> /// <param name= "context" >Current Data Context</param> /// <param name= "virtualpath" >virtual path</param> /// <returns>returns the full path of the HTML string</returns> Public Static stringGethtmlfromvirtualpath (HttpContext context,stringvirtualpath) { stringFilefullpath =context. Server.MapPath (virtualpath); stringHTML =File.readalltext (Filefullpath); returnhtml; } /// <summary> ///output error message to error interface/// </summary> /// <param name= "context" >Current Data Context</param> /// <param name= "virtualpath" >virtual path to the error page</param> /// <param name= "ErrorMsg" >error Message</param> Private voidOutputerror (HttpContext context,stringVirtualPath,stringerrormsg) { stringHtmlerror =Gethtmlfromvirtualpath (context, virtualpath); stringHtmlnewerror = Htmlerror.replace ("{errormsg}", errormsg); Context. Response.Write (Htmlnewerror); }
Common General Class Library