To pass a value on runtime from HTTPContext as response -
i trying pass value http handler module redirected response. planning change view respect value.
//httpmodule  if (!authorizer.isauthorized(controller, action,  context.user)) { context.response.redirect(authorization_failure_url); }   appaccess appaccess = appauth.getapplicationaccessstatus("app1", context.user.identity.name.tostring(), avlaccessmode, edit);    // getting application access mode
depending on appaccess, need pass value response
httpcontext.current.response.cache.setcacheability(httpcacheability.nocache);  httpcontext.current.response.cache.setexpires(datetime.now.addseconds(-1));   //httpmodule ends
in view, passed value need change view.
any idea in passing value http module view helpful.
i tried this
httpcontext.current.items.add("mode", "read");
i able set value in httpmodule , same can accessible view. worked.
thanks.
Comments
Post a Comment