ASP中的HTML HREF链接 [英] HTML HREF link in ASP

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

问题描述

我正在尝试执行以下操作,但是当我将代码输入hte

HREF链接时,我收到运行时错误。如何将链接传递给最终

用户?


<%

将字符串调暗为

Dim b as string

a = request.browser.browser

b =" IE"

如果a< b then

response.write(" You are using& a&")查看此页面。请

使用

Internet Explorer 。")

其他

< a href =" http://example.com/index.aspx">

< img src =" ./ button.jpg" border =" 0">

< / a>

结束如果

%>

解决方案

< re ***** @ gmail.comwrote in message

news:38 ************ ********************** @ x35g2000 hsb.googlegroups.com ...


我得到运行时错误



作为一般规则,当在技术新闻组中寻求帮助时,说我/ b $ b得到运行时错误。如果你实际上没有告诉

组运行时错误是什么,那就没有用了...

-

Mark Rae

ASP / ASP.NET MVP
http:// www。 markrae.net


< re ***** @ gmail.comwrote in message

news: 38 ********************************** @ x35g2000 hsb.googlegroups.com ...
< blockquote class =post_quotes>
我正在尝试执行以下操作,但是当我将代码输入hte

HREF链接时,我收到运行时错误。如何将链接传递给最终

用户?


<%

将字符串调暗为

Dim b as string

a = request.browser.browser

b =" IE"

如果a< b then

response.write(" You are using& a&")查看此页面。请

使用

Internet Explorer 。")

else


< a href =" http://example.com/index.aspx">

< img src =" ./ button.jpg" border =" 0">

< / a>


结束如果

%>



你错过了一对%<%的html代码。


请注意,获得ASP.NET帮助的最佳位置是mpdotnet.framework.aspnet


-

Anthony Jones - MVP ASP / ASP.NET

< br>

" Anthony Jones" < An*@yadayadayada.com写信息

新闻:%2 ****************** @ TK2MSFTNGP03.phx.gbl ...


请注意,获得ASP.NET帮助的最佳位置是

mpdotnet.framework.aspnet



是的,但OP的问题与经典ASP中的VBScript有关...

-

Mark Rae

ASP.NET MVP
http://www.markrae.net


I''m trying to do the following, but when I have the code in for hte
HREF link I get a runtime error. How do I pass the link to the end
user?

<%
Dim a as string
Dim b as string
a = request.browser.browser
b = "IE"
if a <b then
response.write( "You are using " & a & " to view this page. Please
use
Internet Explorer.")
else
<a href="http://example.com/index.aspx">
<img src="./button.jpg" border="0">
</a>
end if
%>

解决方案

<re*****@gmail.comwrote in message
news:38**********************************@x35g2000 hsb.googlegroups.com...

I get a runtime error

As a general rule, when asking for help in a technical newsgroup, saying "I
get a runtime error" is not very helpful if you don''t actually tell the
group what the runtime error is...
--
Mark Rae
ASP / ASP.NET MVP
http://www.markrae.net


<re*****@gmail.comwrote in message
news:38**********************************@x35g2000 hsb.googlegroups.com...

I''m trying to do the following, but when I have the code in for hte
HREF link I get a runtime error. How do I pass the link to the end
user?

<%
Dim a as string
Dim b as string
a = request.browser.browser
b = "IE"
if a <b then
response.write( "You are using " & a & " to view this page. Please
use
Internet Explorer.")
else
<a href="http://example.com/index.aspx">
<img src="./button.jpg" border="0">
</a>
end if
%>

Your missing a pair of % <% around the html code.

Note that the best place to get ASP.NET help is m.p.dotnet.framework.aspnet


--
Anthony Jones - MVP ASP/ASP.NET


"Anthony Jones" <An*@yadayadayada.comwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...

Note that the best place to get ASP.NET help is
m.p.dotnet.framework.aspnet

It is, but the OP''s problem relates to VBScript in classic ASP...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net


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

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