PageRenderTime 33ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/WEB/_err/Error.aspx.cs

https://bitbucket.org/zzare/eko
C# | 46 lines | 38 code | 7 blank | 1 comment | 5 complexity | 948616c6ee5e506c8c30a39848ec2b13 MD5 | raw file
  1. using System;
  2. using System.Collections;
  3. using System.Configuration;
  4. using System.Data;
  5. using System.Linq;
  6. using System.Web;
  7. using System.Web.Security;
  8. using System.Web.UI;
  9. using System.Web.UI.HtmlControls;
  10. using System.Web.UI.WebControls;
  11. using System.Web.UI.WebControls.WebParts;
  12. using System.Xml.Linq;
  13. public partial class _err_Error : SM.EM.UI.BasePage
  14. {
  15. protected override void OnInit(EventArgs e)
  16. {
  17. base.OnInit(e);
  18. CheckPermissions = false;
  19. }
  20. protected void Page_Load(object sender, EventArgs e)
  21. {
  22. SetTitle("Error");
  23. if (!IsPostBack)
  24. {
  25. int code = -1;
  26. code = int.Parse(Request.QueryString["e"]);
  27. if (code != -1)
  28. lbText.Text = ERROR_LOG.RenderError(code);
  29. else
  30. lbText.Text = "Stran ne obstaja.";
  31. // page not found
  32. if (code == 404)
  33. {
  34. Response.StatusCode = 404;
  35. Response.StatusDescription = "Page not found";
  36. }
  37. }
  38. }
  39. }