从ASPX页面获取iFrame源 [英] Get iFrame source from aspx pages

查看:98
本文介绍了从ASPX页面获取iFrame源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个i框架.它的src是在pageload中设置的.我需要读取框架的html源以获取一些数据s.我如何实现这一点.我尝试了以下代码,但没有使用.有什么办法吗?

页面加载

Hi,

I have got an i Frame.It''s src is set from in pageload.I need to read the html source of the frame in order to get some data s.How can i implement this.I tried the following code but of no use.Is there any way?

Pageload

Pageload
frameHoroscope.Attributes.Add("src", "");
Readdata();

void Readdata()
    {
        string data = frameHoroscope.InnerHtml;
     }

推荐答案

嗨@deepak

你可以试试这个
frameHoroscope.Attributes.Add("src","pagename.aspx");

您可以在源代码之后设置页面名称,并根据需要处理此页面上的方法(pagename.aspx).

希望对您有帮助

谢谢
Hi @deepak

You can try this
frameHoroscope.Attributes.Add("src", "pagename.aspx");

You can set the page name after the source and process the mathod on this page(pagename.aspx)whatever you want.

Hope it will help you

Thanks


这篇关于从ASPX页面获取iFrame源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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