mercredi 23 décembre 2015

how to handle page in MVC? page object showing null value how can I use this statement in MVC4?

I have two interfaces in my asp.net(C#) application(IAppNavigation,IViewDimensions) , I am converting the asp.net application into asp.net MVC4(razor).

The below code is in some class file

       Page Page = null;
            if (Page == null)
            {
                Page = HttpContext.Current.Handler as Page;
            }

  IViewDimensions dims = ((IAppNavigation)Page).GetCurrentDimensions();

How to handle page in MVC? page object showing null value how can I use this statement in MVC4?

Please find the below the listed two interfaces.

public interface IAppNavigation
    {
       IViewDimensions GetCurrentDimensions();  
    }

public interface IViewDimensions
    {
        DimensionDetail this[string dimensionName]
        {
            get;
        }

        DimensionDetail[] Dimensions
        {
            get;
        }

        IViewDimensions Clone();

        void SetDimension( string dimensionName, string memberName );

        List<int> GetGeoIds(string geo);
    }

Aucun commentaire:

Enregistrer un commentaire