如何在c#和asp.net中访问JavaScript代码及其信息 [英] How to access JavaScript code and its information in c# and asp.net

查看:78
本文介绍了如何在c#和asp.net中访问JavaScript代码及其信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个小项目,但是遇到了问题.

如果我想从网页/博客中获取一些信息,则可以使用webclient方法并使用c#.net中的HTMLAgilityPack解析HTML页面.

但是这次我想从位于博客文章旁边的共享按钮(即FB共享,转推按钮等)中获取信息.这些按钮还包含有关帖子共享时间的信息.(按钮附带的编号)所以我想访问该信息.

我知道这是用JavaScript文件编码的(对吗?),所有信息仅包含在其中.

但是我想访问该信息...

请建议出路吗?

谢谢

I am working on a small project and i have got a problem.

If i want to get some information from a web page/blog then i can use webclient method and parse the HTML page using HTMLAgilityPack in c#.net It''s okay

But this time i want to get the information from Share buttons (i.e. FB share, Retweet button etc) located along with a blog post. These buttons also contains the information about how much time a post has been shared.(no. given with the button) So i want to access that information.

I know that this is coded with a JavaScript file (m i right ?) and all information is contained within that only.

But i want to access that information...

Please suggest a way out ?

Thanks

推荐答案

下面的链接将为您提供有关"Facebook共享按钮"实现的想法.
http://developers.facebook.com/docs/share/

您可以使用以上信息来获取/获取BlogPost的"Facebook分享"信息.

您还可以查看我下面的提示/技巧.(不是广告:))
在Facebook和Twitter上查看网站的共享计数
Below link will provide you idea about "Facebook Share Button" implementation.
http://developers.facebook.com/docs/share/

You may use above information to get/fetch "Facebook Share" information of your BlogPost.

You can also check my below Tip/Trick.(not an advertisement :))
Check Website’s Shared Count on Facebook and Twitter


如果您指的是RSS feed,则可以使用feeder类.
If you are referring to RSS feed, then you can use feeder class.


这篇关于如何在c#和asp.net中访问JavaScript代码及其信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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