简体   繁体   English

将标签嵌入到ASP.NET中的其他网站

[英]Embedding Label to other websites in ASP.NET

I am working on a website & it required to show a counter on home page.So I used an asp label as a counter that counts & display the DB records (ie 180000).It is working perfectly alright. 我在一个网站上工作,并且它需要在首页上显示一个计数器。因此,我使用了一个asp标签作为可对数据库记录进行计数和显示的计数器(例如180000)。

Now problem is that.I want to make it embed able I want to embed that label to other websites. 现在的问题是。我想使其能够嵌入,我想将该标签嵌入其他网站。

e.g : <EMBED SRC="http://www.XXXX.com/graphics/sounds/18.mid" HEIGHT=60 WIDTH=144>

It should be dynamic (Counter Changes on home page should reflect where this counter has been embedded ie on blogs or on forums ) . 它应该是动态的(主页上的“计数器更改”应反映该计数器的嵌入位置,即在博客或论坛上)。

How can I do this? 我怎样才能做到这一点?

Also what would be the best approach,a simple embed code, a iframe or through Java Script? 另外,最好的方法是简单的嵌入代码,iframe还是通过Java Script?

Thanks 谢谢

There are lots of ways to do this. 有很多方法可以做到这一点。 Without more information, it's hard to recommend an exact method. 没有更多信息,很难推荐一种确切的方法。 If all you want to do is display a number in html, then you can simply create an aspx page that writes the number and then let people iframe to it. 如果您要做的就是用html显示数字,则可以简单地创建一个aspx页面来编写数字,然后让人们对其进行iframe。

If you want to get more dynamic, you can create a generic ashx handler , or set up a web service that displays that information for you. 如果要提高动态性,可以创建一个通用的ashx处理程序 ,或设置一个为您显示该信息的Web服务

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM