简体   繁体   中英

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.

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?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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