ScrewTurn.Wiki.UrlTools.Redirect C# (CSharp) Method

Redirect() public static method

Redirects the current response to the specified URL, properly appending the current namespace if any.
public static Redirect ( string target ) : void
target string The target URL.
return void
        public static void Redirect(string target)
        {
            Redirect(target, true);
        }

Same methods

UrlTools::Redirect ( string target, bool addNamespace ) : void

Usage Example

示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AdminMaster.RedirectToLoginIfNeeded();

            currentWiki = DetectWiki();

            string currentUser = SessionFacade.GetCurrentUsername();

            string[] currentGroups = SessionFacade.GetCurrentGroupNames(currentWiki);

            if (!AdminMaster.CanManageGroups(currentUser, currentGroups))
            {
                UrlTools.Redirect("AccessDenied.aspx");
            }
            aclActionsSelector.Visible = AdminMaster.CanManagePermissions(currentUser, currentGroups);

            revName.ValidationExpression = GlobalSettings.UsernameRegex;

            if (!Page.IsPostBack)
            {
                rptGroups.DataBind();
                providerSelector.Reload();
                btnNewGroup.Enabled = providerSelector.HasProviders;
            }
        }
All Usage Examples Of ScrewTurn.Wiki.UrlTools::Redirect