[CLOSED] Ext.net PopUp in CustionFilter using MVC razor Engine

  1. #1

    [CLOSED] Ext.net PopUp in CustionFilter using MVC razor Engine

    Hi,

    I am having a Ext.net Popup (Html.X().Window()) on my shared view i.e _Layout.css.
    I am using CustomFilter to check whether user is Authorize or not, My requirement is whenever user click on unauthorized page, Popup should appear stating that user is not authorized.

    So is there any way to invoke Ext.PopUp from CustomFilter?

    //PopUp on _Layout
     @(Html.X().Window()
            .Width(300)
            .ID("NotAuthPopUp")
            .Height(300)
            .Layout(LayoutType.Fit)
            .Icon(Icon.Application)
            .Items
            (
            Html.X().Label("Your are not authorized").Margin(10).StyleSpec("color: red; font-size:30px; font-family:Nyala; background-color: #FFFFCC; display:block; width:auto;")
            )
     )
    //CustomFilter
      public override void OnAuthorization(AuthorizationContext filterContext)
        {
            base.OnAuthorization(filterContext);
    
            if (filterContext.HttpContext.User.Identity.IsAuthenticated && filterContext.Result is HttpUnauthorizedResult)
            {
                //Invoke Popup from code behind (from CustomFilter)
            }
        }
    Thanks
    Last edited by Daniil; Sep 05, 2013 at 5:36 AM. Reason: [CLOSED]
  2. #2
    Hi @PriceRightHTML5team,

    Please try to make redirection to a controller action where show a popup Window using a PartilaViewResult.

Similar Threads

  1. [CLOSED] How to use Xscript in Razor engine
    By alscg in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 19, 2013, 5:25 AM
  2. X.Redirect ASP.NEt Razor Engine
    By alexiism in forum 2.x Help
    Replies: 0
    Last Post: Dec 14, 2012, 5:39 PM
  3. Replies: 2
    Last Post: Jan 16, 2012, 9:53 AM
  4. Razor engine in MVC 3
    By Dominik in forum Open Discussions
    Replies: 7
    Last Post: Jan 16, 2012, 9:46 AM

Posting Permissions