如何将服务器端控件置于Literal中? [英] How to put server-side control in Literal?

查看:111
本文介绍了如何将服务器端控件置于Literal中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将服务器端控件放在Literal中.是否有可能?如果是,怎么办?我知道该课程的描述说明了一切:

I want put a server-side control in a Literal. Is it possible? If yes, how? I know the description of the class says it all:

表示ASP.NET中的HTML元素,文本和任何其他字符串 不需要在服务器上进行处理的页面

Represents HTML elements, text, and any other strings in an ASP.NET page that do not require processing on the server

推荐答案

如果要将服务器端代码包装在其他控件中,则可能要使用Panel.正如评论所指出的那样,将文字文本视为服务器端控件是不可能的.

If you want to be wrapping server side code in other controls you probably want to be using Panel. As the comments have already stated, it is impossible to treat literal text as a server side Control.

这篇关于如何将服务器端控件置于Literal中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆