读书人

关于Ajax实现GridView or DataList解决

发布时间: 2012-01-13 22:43:30 作者: rapoo

关于Ajax实现GridView or DataList
有两个网页A和B,dataListA 已在网页A生成。
我怎样能够获取网页A上dataListA的html代码,赋给变量s,
然后在网页B上 this.Response.Write(s);

下面是网页B上s变量示例,我现在想从网页A上获得,而不是直接写!
string s = @ " <table cellspacing= '0 ' cellpadding= '4 ' width= '300 ' height= '200 ' border= '0 ' id= 'GridView1 ' style= 'color:#333333;border-collapse:collapse; '> ";

s += " <tr style= 'color:#333333;background-color:#FFFBD6; '> ";
s += " <td width= '50 '> 名称: </td> ";
s += " <td> " + dr[ "areaID "] + " </td> ";
s += " </tr> ";
s += " <tr style= 'color:#333333;background-color:White; '> ";
s += " <td scope= 'col '> 描述: </td> ";
s += " <td> " + dr[ "areaName "] + " </td> ";
s += " </tr> ";
s += " </table> ";
dr.Close();
conn.Close();
this.Response.Write(s);
this.Response.End();

[解决办法]
session[ "list "]=dataListA;

[解决办法]
用正则把要得东西 从HTML中捞出来

读书人网 >asp.net

热点推荐