Aug 30, 2013, 9:22 AM
[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?
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]