需求(程序员角度):
1,商品查询页面(AppItemSearch.aspx)发送了这样一个请求:AppItemIntroduction.aspx?ItemId=xxx
2,商品介绍页面(AppItemIntroduction.aspx)根据ItemId "xxx"从数据库中ItemIntroductionLinks表中查询对应xxx的商品介绍文档的链接(ItemIntroLink字段),并将此连接的内容显示到AppItemIntroduction.aspx页面上。
注:AppItemIntroduction.aspx根据ItemId读取的不是商品介绍的内容而仅仅是一个链接名称;商品介绍文档放在与此应用不同域的服务器上;商品介绍文档是html或word文档。
假设:AppItemIntroduction.aspx已经根据ItemId在ItemIntroductionLinks中找到了对应的文档url,存于ls_RedURL变量里。
思路:在AppItemIntroduction.aspx里生成一个iframe标志,变量ls_RedURL的值动态赋给iframe的src属性。
简单源码(vb.net)如下: