本文介绍了渲染Web服务器控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以在运行时找出我的Web服务器控件正在运行的上下文?我需要在运行时知道Web服务器控件是在mvc上下文中还是在Web窗体上下文中运行.

Is there a way to find out at runtime which is the context my web server control is running? I need to know at runtime if the web server control runs in mvc context or web forms context.

推荐答案

var loadedAssemblies = AppDomain.CurrentDomain.GetAssemblies();


然后寻找System.Web.MVC.


and look for System.Web.MVC.


这篇关于渲染Web服务器控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 00:43
查看更多