“.aspx”页面中的锚标记出现问题 [英] Problem with anchor tag in '.aspx' page

查看:51
本文介绍了“.aspx”页面中的锚标记出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我是asp.net和c#的新手。


我的我有以下锚标记;&的Index.aspx QUOT;页面:

< a href =" www.google.com" target =" _blank"> Google< / a>


当我点击上面的链接时,它将会:


" http:// localhost:1100 / CSMS / www.google.com"


而不是:

" www.google.com"


请帮帮我。


提前一百万。

解决方案

< blockquote>将您的链接更改为:

展开 | 选择 | Wrap | 行号


这不是.NET问题,而是HTML 101。问题。

您需要在链接中使用http://。

我还推荐一个html设计的基础教程。


我会移动这个帖子。

MODERATOR

< br>

@Plater


Hello Hello,


此链接不会转到Google主页即使我在href标签中包含''http://''页面也是如此。


< a href =" www.google.com" target =" _blank"> Google< / a>


如果我在html页面中使用(比如index.html),上面提到的链接工作得很好


但是,如果我在.NET页面中使用相同的上述链接(比如index.aspx),该页面会自动将ASP.NET服务器的完全限定URL添加到href属性中的URL。 br />

请注意,上述错误仅在.NET页面中发生。


Hello everyone,

I am new beginner to asp.net and c#.

I have the following anchor tag in my "Index.aspx" page:
<a href="www.google.com" target="_blank">Google</a>

And, when I click on the above link it is going to:

"http://localhost:1100/CSMS/www.google.com"

instead of:
"www.google.com"

Please help me out.

Thanks a million in advance.

解决方案

Change your link to:

Expand|Select|Wrap|Line Numbers


This is not a .NET issue, this is an "HTML 101" issue.
You need to have the http:// in your links.
I also recommend a basic tutorial in html design.

I will move this thread.
MODERATOR


@Plater
Hello Guys,

The link is not going to Google home page even if I include ''http://'' in the href tag.

<a href="www.google.com" target="_blank">Google</a>

The above mentioned link is working perfectly fine if I use in html page (say index.html)

But, if I use the same above link in a .NET page (say index.aspx), the page is automatically adding the fully qualified URL of ASP.NET server to the URL in href attribute.

Please note that the above mentioned error is occurring only in .NET pages.


这篇关于“.aspx”页面中的锚标记出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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