Edit.Page_Load C# (CSharp) Method

Page_Load() protected method

protected Page_Load ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
    protected void Page_Load(object sender, EventArgs e)
    {
        Auth.OnlyAdminAllowed();

        urlpath = Util.PathFromUrl;

        if (!IsPostBack) {
          Wiki.Page page = DbServices.FindPageByUrlpath(urlpath);
          litHeader.Text = page.path;
          txtPath.Text = page.path;
          txtRichEditor.Text = page.contents;
          hlCancel.NavigateUrl = "./?" + urlpath;

          // If it's the home page, don't allow them to change the path or remove it
          if (urlpath == "/") {
        txtPath.Enabled = false;
        bnDelete.Enabled = false;
          }
        }
    }