我们现在做的项目,是一个应用软件,软件视图里嵌入了网页,上面有一些要显示的图形,要怎么决定架构啊?用asp.net 怎么画出一些复杂的图形啊?用asp.net能读取xml文件数据吗?能不能调用dll使asp.net动态地获取应一个应用程序的xml数据呢?多谢指导!

解决方案 »

  1.   

    //查询xml(C#)
    DataSet strxml=new DataSet(); 
    string path="XMLFile1.xml";
    strxml.ReadXml(Server.MapPath(path));
    this.TextBox1.Text=strxml.Tables[0].Rows[0]["sqlchaxun"].ToString();
    this.TextBox2.Text=strxml.Tables[0].Rows[1]["sqlchaxun"].ToString();
    //XMLFile1.xml
    <?xml version="1.0" encoding="utf-8" ?>
    <sql>
     <sqlyhtj>
      <sqlchaxun>中华人民共和国</sqlchaxun>
     </sqlyhtj>
     <sqlyhtj>
      <sqlchaxun>中华人民共和国1</sqlchaxun>
     </sqlyhtj>
    </sql>//修改xml(c#)
    System.Xml.XmlDocument str1=new System.Xml.XmlDocument();
    string path="XMLFile1.xml";
    str1.Load(Server.MapPath(path));
    System.Xml.XmlNode str2=str1.SelectSingleNode("/sql/sqlyhtj/sqlchaxun");
    str2.InnerText=this.TextBox1.Text.Trim();
    str1.Save(Server.MapPath(path));
    //XMLFile1.xml
    <?xml version="1.0" encoding="utf-8"?>
    <sql>
      <sqlyhtj>
        <sqlchaxun>yaomingchensss</sqlchaxun>
      </sqlyhtj>
    </sql>
    //读xml
    //xml
    <?xml version="1.0" encoding="utf-8"?>
    <yhgl>
      <liebiaoxiang>
        <ACTIDNAME>帐号</ACTIDNAME>
        <ACTID>True</ACTID>
        <USRNAMENAME>用户名称</USRNAMENAME>
        <USRNAME>True</USRNAME>
      </liebiaoxiang>
    </yhgl>this.ACTID.Text=dsread.Tables[0].Rows[0]["ACTIDNAME"].ToString();
    this.ACTID.Checked=bool.Parse(dsread.Tables[0].Rows[0]["ACTID"].ToString());
    this.USRNAME.Text=dsread.Tables[0].Rows[0]["USRNAMENAME"].ToString();
    this.USRNAME.Checked=bool.Parse(dsread.Tables[0].Rows[0]["USRNAME"].ToString());for(int i=1;i<=46;i++)
    {
    BoundColumn columni=new BoundColumn();
    columni.HeaderText=dsxml.Tables[0].Rows[i]["chinese"].ToString();
    columni.DataField=dsxml.Tables[0].Rows[i]["english"].ToString();
    columni.HeaderStyle.Wrap=false;
    columni.ItemStyle.Wrap=false;  columni.Visible=bool.Parse(dsyincang.Tables[0].Rows[0][dsxml.Tables[0].Rows[i]["english"].ToString()].ToString());
    //列标题居中显示
    columni.HeaderStyle.HorizontalAlign=HorizontalAlign.Center;
    //列内容居左显示
    columni.ItemStyle.HorizontalAlign=HorizontalAlign.Left;
    this.DataGrid1.Columns.Add(coli);
    }
      

  2.   

    1.参看利用ASP.NET创建图表 
      http://info.westpower.com.cn/cgi-bin/GInfo.dll?DispInfo&w=westpower&nid=4241262。参看通过DataSet读取XML的效率... 
      http://www.cnblogs.com/joaen/archive/2005/07/01/184776.aspx
      

  3.   

    用asp.net 怎么画出一些复杂的图形啊?--->考虑到效率问题还是用owc吧!用asp.net能读取xml文件数据吗?-->dataset or XmlDocument or Xml...Reader能不能调用dll使asp.net动态地获取应一个应用程序的xml数据呢?-->xml可以做为数据库用,这个自然没有问题.