<%and%>模块中的标记 [英] <% and %> markers in a module

查看:82
本文介绍了<%and%>模块中的标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All


我正在尝试将我现有的网站从ASP升级到ASP.NET而且我需要一个包含各种常用功能的文件几页

在网站上。在尝试转换此页面时,我遇到了问题

,因为我是<%和%>标记在ASP.NET中似乎无效;有什么方法可以在模块文件中包含HTML块吗?

在ASP中可能吗?


例如,如何我可以使用<%和%>写下面的标记

功能:

Sub WriteMandatory()

%>

& nbsp; < span class =" bodyred">

*

< / span>& nbsp;

<%

结束子


这是我试图转换的函数的一个简单示例,

我确实意识到这个函数可以很容易转换为不使用<%

和%>标记!


我在每个页面都包含这个模块(common.vb)。


感谢您的帮助


Paul

Hello All

I am trying to upgrade my existing website from ASP to ASP.NET and I
have a file which included various functions common to several pages
in the site. While trying to convert this page I am having problems
because I the <% and %> markers appear to be invalid in ASP.NET; is
there any way of including HTML blocks in a module file as was
possible in ASP?

For instance, how can I use <% and %> markers to write the following
function:
Sub WriteMandatory()
%>
&nbsp;<span class="bodyred">
*
</span>&nbsp;
<%
End Sub

This is a simple example of the functions that I am trying to convert,
I do realise that this function can easily be converted to not use <%
and %> markers!

I am including this module (common.vb) in each page.

Thanks for any assistance

Paul

推荐答案

po******@sweeney-kincaid.com (Pdarroch)写道:

新闻:56 ***************** *********@posting.google.c om:
po******@sweeney-kincaid.com (Pdarroch) wrote in
news:56**************************@posting.google.c om:
例如,我如何使用<%和%>写下以下功能的标记
功能:
Sub WriteMandatory()
%>
& nbsp;< span class =" bodyred">
*
< / span>& nbsp;
<%
End Sub
For instance, how can I use <% and %> markers to write the following
function:
Sub WriteMandatory()
%>
&nbsp;<span class="bodyred">
*
</span>&nbsp;
<%
End Sub




要写出文字,请使用文字控制,并将文本添加到文字

控件。回复。在.NET中再写文本不是一个好主意。


-

Lucas Tam(RE ***** ***@rogers.com)

请删除删除来自回复时的电子邮件地址。
http://成员。 ebay.com/aboutme/coolspot18/


您好


只是为了澄清:

是否无法快速转换模块中的大型函数

<%和%>中包含几十行HTML什么标记

兼容ASP.NET,同时最好还是在输出中保持HTML格式化?


感谢您的快速回复


PD


***通过Developersdex发送 http://www.developersdex.com ***

不要只是参加USENET ...获得奖励它!
Hi

Just to clarify:
Is there no way to quickly convert large functions in modules with
dozens of lines of HTML contained within <% and %> markers to something
that is ASP.NET compatible, while preferably still maintaining the
formatting of the HTML in the output?

Thanks for quick response

PD

*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!





只是为了澄清:

有没有办法快速转换大模块中的函数

<%和%>中包含几十行HTML什么标记

兼容ASP.NET,同时最好还是在输出中保持HTML格式化?


感谢您的快速回复


PD


***通过Developersdex发送 http://www.developersdex.com ***

不要只是参加USENET ...获得奖励它!
Hi

Just to clarify:
Is there no way to quickly convert large functions in modules with
dozens of lines of HTML contained within <% and %> markers to something
that is ASP.NET compatible, while preferably still maintaining the
formatting of the HTML in the output?

Thanks for quick response

PD

*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!


这篇关于&lt;%and%&gt;模块中的标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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