在页面中添加一个iframe来存放你的曲线控件,然后用xmlhttp来后台刷新曲线数据
var oXMLHTTP = new ActiveXObject( "Microsoft.XMLHTTP" );
var sURL = "delEquip.aspx?id=" + id + "&isFolder="+ ftype;
//alert (sURL)
oXMLHTTP.open( "POST", sURL, false ); oXMLHTTP.send();
var oXMLHTTP = new ActiveXObject( "Microsoft.XMLHTTP" );
var sURL = "delEquip.aspx?id=" + id + "&isFolder="+ ftype;
//alert (sURL)
oXMLHTTP.open( "POST", sURL, false ); oXMLHTTP.send();
解决方案 »
- 菜鸟 跪求一个 弱弱的 关于调试出错问题 的答案
- 求一句c#:如果文件"C:\333.txt"存在,则....
- 在内容页中如何给母版页控件的事件赋一个处理的方法????查了好多都不行 C# asp.net2.0
- ???????的问题
- 我心仪的公司找我面试了,大家给我提个建议吧,多谢多谢!!
- 如何写文件?
- 头痛的问题,希望能得到答案~~~急!
- 请教 如何用C# 实现整个文件夹的 上传!
- SESSION会莫名其妙的丢失!!!.NET的BUG????
- 来自MONO的最新消息!!!马上就能拥有LINUX下的C#执行环境了!!!
- 请教怎么写开发计划~~~~~
- 为何某些机器安装framework后运行程序都出错!
不过VML也挺麻烦的,可以参考画线的语句,主要是修改其中的坐标就可以了,
客户端发送请求,
在服务器循环数据,每段数据画一条线,生成HTML后返回.
哪位能给点XmlHttp的资料啊
private void Button1_Click(object sender, System.EventArgs e)
{
//显示坐标系
StreamReader fs=new StreamReader(Server.MapPath(""+"hzbx.js"));
tmpsql=fs.ReadToEnd();
fs.Close();
this.RegisterStartupScript("hzbx","<script>"+tmpsql+"</script>");
zt();
//this.RegisterStartupScript("tx","<script>"+tmpsql+"</script>"); fs=new StreamReader(Server.MapPath(""+"xstx.js"));
tmpsql=fs.ReadToEnd();
fs.Close();
this.RegisterStartupScript("xstx","<script>"+tmpsql+"</script>");
//显示坐标系
}
private void zt() //坐图
{
zlsr();
xbc=fhxbc();
ybc=fhybc();
tmpsql="sf.linewidth(2);"; //线宽";"
for (int i=0;i<txsj.yysr.Count;i++)
{
if (i>0)
{
tmpsql+="sf.linecolor(ml.colorrgb(0,1,0));"; //绿色线划门诊收入
tmpsql+="sf.line('"+bhx((i-1)*xbc)+"','"+bhy((txsj.yysr[i-1].门诊收入-min)*ybc)+"','"+bhx(i*xbc)+"','"+bhy((txsj.yysr[i].门诊收入-min)*ybc)+"');";
tmpsql+="sf.linecolor(ml.colorrgb(0,0,1));"; //兰色线划住院收入
tmpsql+="sf.line('"+bhx((i-1)*xbc)+"','"+bhy((txsj.yysr[i-1].住院收入-min)*ybc)+"','"+bhx(i*xbc)+"','"+bhy((txsj.yysr[i].住院收入-min)*ybc)+"');";
tmpsql+="sf.linecolor(ml.colorrgb(1,0,0));"; //红色线划总收入
tmpsql+="sf.line('"+bhx((i-1)*xbc)+"','"+bhy((txsj.yysr[i-1].总收入-min)*ybc)+"','"+bhx(i*xbc)+"','"+bhy((txsj.yysr[i].总收入-min)*ybc)+"');";
//写x轴坐标
if (txsj.yysr.Count<=6)
tmpsql+="sf.text('"+txsj.yysr[i].日期.ToShortDateString()+"','"+bhx(i*xbc-100)+"','"+bhy(5)+"');";
else
{
int bc=txsj.yysr.Count/6;
if (i==bc)
tmpsql+="sf.text('"+txsj.yysr[i].日期.ToShortDateString()+"','"+bhx(100)+"','"+bhy(5)+"');";
if (i==2*bc)
tmpsql+="sf.text('"+txsj.yysr[i].日期.ToShortDateString()+"','"+bhx(200)+"','"+bhy(5)+"');";
if (i==3*bc)
tmpsql+="sf.text('"+txsj.yysr[i].日期.ToShortDateString()+"','"+bhx(300)+"','"+bhy(5)+"');";
if (i==4*bc)
tmpsql+="sf.text('"+txsj.yysr[i].日期.ToShortDateString()+"','"+bhx(400)+"','"+bhy(5)+"');";
if (i==5*bc)
tmpsql+="sf.text('"+txsj.yysr[i].日期.ToShortDateString()+"','"+bhx(500)+"','"+bhy(5)+"');";
if (i==6*bc)
tmpsql+="sf.text('"+txsj.yysr[i].日期.ToShortDateString()+"','"+bhx(600)+"','"+bhy(5)+"');";
}
}
}
//写y轴坐标
string y1;
string y2;
string y3;
y1=Convert.ToString(Math.Round(((max-min)/3+min),0));
y2=Convert.ToString(Math.Round((2*(max-min)/3+min),0)) ;
y3=Convert.ToString(Math.Round(max,0)) ;
tmpsql+="sf.text('"+y1+"','"+bhx(0)+"','"+bhy(100)+"');";
tmpsql+="sf.text('"+y2+"','"+bhx(0)+"','"+bhy(200)+"');";
tmpsql+="sf.text('"+y3+"','"+bhx(0)+"','"+bhy(290)+"');";
this.RegisterStartupScript("zt","<script>"+tmpsql+"</script>" );
}