HTML中的代码 [英] Code in HTML

查看:70
本文介绍了HTML中的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




在HTML中,如果我尝试输入if语句,我会收到错误:

BC30201:表达式预期


这是一个简化的例子:


<%#If StoreNumber =" 1"然后%>


< b> Store1< / b>


<%#EndIf%>


谢谢


-

通过 http://www.dotnetmonster.com

推荐答案

使用<%代码。 <%#用于数据库。


作为旁注,这有点老式。我建议在代码中执行此操作,而不是像ASP.NET前几天那样混合代码和HTML ...


Patrice


-


" Joe via DotNetMonster.com" < FO *** @ DotNetMonster.com> écritdansle

message de news:21 ****************************** @ DotNetMonste r .com ...
Use <% for code. <%# is for databidning.

As a side note this is a bit old style. I would recommend doing this in code
behing rather than mixing code and HTML as in the pre ASP.NET days...

Patrice

--

"Joe via DotNetMonster.com" <fo***@DotNetMonster.com> a écrit dans le
message de news:21******************************@DotNetMonste r.com...


在HTML中,如果我尝试输入if语句,我会收到错误:
BC30201:表达式预期
<%#If StoreNumber =" 1"然后%>

< b> Store1< / b>

<%#EndIf%>

谢谢

-
通过 http://www.dotnetmonster.com



好的。非常感谢。


-

通过 http://www.dotnetmonster.com
Okay. Thanks so much.

--
Message posted via http://www.dotnetmonster.com


" Patrice" <无**** @ nowhere.com>在消息中写道

news:uZ ************** @ TK2MSFTNGP10.phx.gbl ...
"Patrice" <no****@nowhere.com> wrote in message
news:uZ**************@TK2MSFTNGP10.phx.gbl...
使用<%for码。 <%#用于数据库。

作为旁注,这有点老式。我建议在
代码中进行此操作,而不是像ASP.NET前几天那样混合代码和HTML ...


如何控制输出的html将在哪里出现在aspx页面上如果

你在你的代码中执行此操作?例如,如果我有一个搜索表单和执行一些sql语句的
a搜索按钮,所有这些都在后面的代码中处理了

,我该如何处理response.writing搜索结果

到搜索页面的底部?

Patrice

-

; Joe通过DotNetMonster.com < FO *** @ DotNetMonster.com> écritdansle
消息新闻:21 ****************************** @ DotNetMonste r.com .. 。
Use <% for code. <%# is for databidning.

As a side note this is a bit old style. I would recommend doing this in code behing rather than mixing code and HTML as in the pre ASP.NET days...
how do you control where the outputted html will show up on the aspx page if
you do this in your code behind? if, for instance, i have a search form and
a search button that executes some sql statements, and all this is handled
in the code behind, how would i go about response.writing the search results
to the bottom of the search page?

Patrice

--

"Joe via DotNetMonster.com" <fo***@DotNetMonster.com> a écrit dans le
message de news:21******************************@DotNetMonste r.com...


在HTML中,如果我尝试输入if语句,我会收到错误:
BC30201:表达式预期

<%#If StoreNumber =" 1"然后%>

< b> Store1< / b>

<%#EndIf%>

谢谢

-
通过 http://www.dotnetmonster.com




这篇关于HTML中的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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