我用vml写的程序前台代码是
<html xmlns:vml="urn:schemas-microsoft-com:vml">
<head>
<OBJECT id="vmlRender" classid="CLSID:10072CEC-8CC1-11D1-986E-00A0C955B42E" VIEWASTEXT></OBJECT>
    <style>vml\:* { FONT-SIZE: 12px; BEHAVIOR: url(#VMLRender) }
</style>
 </head>
<body class="bodycolor" leftmargin="2" topmargin="2" onmousedown="DoRightClick();"
    oncontextmenu="nocontextmenu();">
    <div id="mytip2" style="border: 1px dotted #DE7293; padding: 2px; font-size: 10pt;
        width: 100%; position: absolute; top: 0px">
        <img src="../../../../images/icon64_info.png" width="16" height="16" align="absmiddle">在步骤图形框上单击鼠标右键可以弹出功能菜单,双击步骤图形框设置步骤基本属性。
        <u><span style="cursor: hand" onclick="hidetip(mytip2);"><b>->关闭此提示<b></span></u>
    </div>
   <form id="Form1" method="post" runat="server">
           <div>
<vml:Line style='DISPLAY:none;Z-INDEX:15;POSITION:absolute' id='line1' from="0,0" to="0,0">
<!--直线可视化-->
<vml:Stroke dashstyle='shortDash' />
</vml:Line>
<%=vml%>
</div>
<input type="hidden" name="SET_SQL"> <input type="hidden" name="FLOW_ID" value="<%=flowId%>">
 <asp:Panel ID="pnlFlowDesc" runat="server" Visible="false">
 <script>
            function hidetip(div)
            {
                div.style.display="none";
            }
            </script>
            <div id="mytip1" style="border:1px dotted #DE7293;padding:2px;font-size:10pt;width:100%;position: absolute;bottom:0px"><b>流程说明:<br></b><asp:Literal ID="litFlowDesc" runat="server"></asp:Literal>&nbsp;&nbsp;<u><span style="cursor:hand" onclick="hidetip(mytip1);"><b>->点击此处隐藏说明<b></span></u></div>
            </asp:Panel>
</form>
</body>
</html>
后台代码是
public partial class general_system_workflow_flow_type_type_view_graph : System.Web.UI.Page
{
            /// <summary>
    /// 传入过程号,获得需要数据
    /// </summary>
    protected void getData(int prcid)
    {
        try
        {
            DAO.Open();
            string mySql = "select prcsid,prcsname,prcsto,setleft,settop from hw_flow_process where flowid=" + flowId + " and prcsid="+prcid;
            OracleCommand myComd = new OracleCommand(mySql,DAO.conn);
            OracleDataReader myReader = myComd.ExecuteReader();
            while(myReader.Read())
            {
                prcsid = myReader.GetInt32(0);
                prcsname = myReader.GetString(1) ;
                this.prcsto = myReader.GetString(2);
                setleft = myReader.GetInt32(3);
                settop = myReader.GetInt32(4);
            }
            myComd.Dispose();
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message.ToString());
        }
        finally
        {
            DAO.Close();
        }
    }    protected int getPrcCount()
    {
        int PrcCount=0;
        try
        {
            DAO.Open();
            string mySql = "select count(*) from hw_flow_process where flowid=" + flowId;
            OracleCommand myComd = new OracleCommand(mySql, DAO.conn);
            PrcCount = Convert.ToInt32(myComd.ExecuteOracleScalar().ToString());
           
        }
        catch (Exception ex)
        {
            
            Response.Write(ex.Message.ToString());
           
        }
        finally
        {
           
            DAO.Close();
            
        }
        return PrcCount;
    }
    protected void showPage()
    {
        int allCount = getPrcCount();
        int mytop=20, myleft=20;
        if (allCount> 0)
        {
            for (int j = 1; j <= allCount; j++)
            {
                
                if (j % 2 == 0&&j>1)
                {
                    mytop += 180;
                }
                else
                {
                    if (j > 1)
                    {
                        myleft += 180;
                        mytop = 20;
                    }
                }
                
                getData(j);
               showRoundrect(allCount,j,myleft,mytop);
                
            }
        }
        else
        {
            this.Response.Write("没有可选步骤");
        }
    }
    protected void showRoundrect(int allCount, int j,int myleft,int mytop)
    {
        if (j == 1)
        {
            vml += "<vml:roundrect inset='2pt,2pt,2pt,2pt' id='" + j + "'table_id='" + j + "'flowType='start' passCount='0' flowTitle='<b>" + j + "</b><br>" + prcsname + "' flowFlag='0' readOnly='0' receiverID='' receiverName='' fillcolor='#00EE00' onDblClick='Edit_Process(236);' style='LEFT:"+myleft+" ; TOP:"+mytop+"; WIDTH: 100; POSITION: absolute; HEIGHT: 50;vertical-align:middle;CURSOR:hand;TEXT-ALIGN:center;z-index:1' arcsize='4321f' coordsize='21600,21600'>";
            vml+="<vml:shadow on='T' type='single' color='#b3b3b3' offset='3px,3px'/>";
            vml+="<vml:textbox inset='1pt,2pt,1pt,1pt' onselectstart='return false;' title='步骤名称:"+prcsname+"下一步骤:'><b>"+j+"</b><br>"+prcsname+"</vml:textbox>";
            vml+="</vml:roundrect>";
            showLine(j);
        }
        else {
            if (j == allCount)
            {
                vml += "<vml:roundrect inset='2pt,2pt,2pt,2pt' id='" + j + "'table_id='" + j + "'flowType='' passCount='0' flowTitle='<b>" + j + "</b><br>" + prcsname + "' flowFlag='0' readOnly='0' receiverID='' receiverName='' fillcolor='#00EE00' onDblClick='Edit_Process(236);' style='LEFT:" + myleft + " ; TOP:" + mytop + "; WIDTH: 100; POSITION: absolute; HEIGHT: 50;vertical-align:middle;CURSOR:hand;TEXT-ALIGN:center;z-index:1' arcsize='4321f' coordsize='21600,21600'>";
                vml += "<vml:shadow on='T' type='single' color='#b3b3b3' offset='3px,3px'/>";
                vml += "<vml:textbox inset='1pt,2pt,1pt,1pt' onselectstart='return false;' title='步骤名称:" + prcsname + "下一步骤:'><b>" + j + "</b><br>" + prcsname + "</vml:textbox>";
                vml += "</vml:roundrect>";
                showLine(j);
            }
            else
            {
                vml += "<vml:roundrect inset='2pt,2pt,2pt,2pt' id='" + j + "'table_id='" + j + "'flowType='end' passCount='0' flowTitle='<b>" + j + "</b><br>" + prcsname + "' flowFlag='0' readOnly='0' receiverID='' receiverName='' fillcolor='#00EE00' onDblClick='Edit_Process(236);' style='LEFT:" + myleft + " ; TOP:" + mytop + "; WIDTH: 100; POSITION: absolute; HEIGHT: 50;vertical-align:middle;CURSOR:hand;TEXT-ALIGN:center;z-index:1' arcsize='4321f' coordsize='21600,21600'>";
                vml += "<vml:shadow on='T' type='single' color='#b3b3b3' offset='3px,3px'/>";
                vml += "<vml:textbox inset='1pt,2pt,1pt,1pt' onselectstart='return false;' title='步骤名称:" + prcsname + "下一步骤:'><b>" + j + "</b><br>" + prcsname + "</vml:textbox>";
                vml += "</vml:roundrect>";
                showLine(j);
            }
            
        }
    }
    protected void showLine(int  j)
    {
        vml += "<vml:line mfrID='" + j + "' title='' source='" + j + "' object='" + (j + 1) + "' from='0,0' to='0,0' style='position:absolute;display:none;z-index:2' arcsize='4321f' coordsize='21600,21600'><vml:stroke endarrow='block'></vml:stroke>";
        vml += "<vml:shadow on='T' type='single' color='#b3b3b3' offset='1px,1px'/>";
        vml+="</vml:line>";
    }
}
这样运行的vml图形不能正常显示,但是
我用静态html写的就可以下面静态的就可以,大侠帮忙了在线等

解决方案 »

  1.   

    这是我写的的静态的vml可以使用,我上面写的是怎么回事啊
    <html xmlns:vml="um:schemas-microsoft-com:vml">
    <head>
    <title >VML sample</title>
    <object id="VMLRender" classid="CLSID:10072CEC-8CC1-11D1-986E-00A0C955B42E">
    </object>
    <style >
    vml\:*{behavior:url(#VMLRender)}
    </style>
    </head>
    <body>
    <div>
    <vml:Line style='DISPLAY:none;Z-INDEX:15;POSITION:absolute' id='line1' from="0,0" to="0,0">
    <!--直线可视化-->
    <vml:Stroke dashstyle='shortDash' />
    </vml:Line>
    <vml:roundrect inset='2pt,2pt,2pt,2pt' id='1'table_id='1'flowType='start' passCount='0' flowTitle='<b>1</b><br>签收' flowFlag='0' readOnly='0' receiverID='' receiverName='' fillcolor='#00EE00' onDblClick='Edit_Process(236);' style='LEFT:20 ; TOP:20; WIDTH: 100; POSITION: absolute; HEIGHT: 50;vertical-align:middle;CURSOR:hand;TEXT-ALIGN:center;z-index:1' arcsize='4321f' coordsize='21600,21600'><vml:shadow on='T' type='single' color='#b3b3b3' offset='3px,3px'/><vml:textbox inset='1pt,2pt,1pt,1pt' onselectstart='return false;' title='步骤名称:签收下一步骤:'><b>1</b><br>签收</vml:textbox></vml:roundrect><vml:line mfrID='1' title='' source='1' object='2' from='0,0' to='0,0' style='position:absolute;display:none;z-index:2' arcsize='4321f' coordsize='21600,21600'><vml:stroke endarrow='block'></vml:stroke><vml:shadow on='T' type='single' color='#b3b3b3' offset='1px,1px'/></vml:line><vml:roundrect inset='2pt,2pt,2pt,2pt' id='2'table_id='2'flowType='end' passCount='0' flowTitle='<b>2</b><br>收文登记' flowFlag='0' readOnly='0' receiverID='' receiverName='' fillcolor='#00EE00' onDblClick='Edit_Process(236);' style='LEFT:20 ; TOP:200; WIDTH: 100; POSITION: absolute; HEIGHT: 50;vertical-align:middle;CURSOR:hand;TEXT-ALIGN:center;z-index:1' arcsize='4321f' coordsize='21600,21600'><vml:shadow on='T' type='single' color='#b3b3b3' offset='3px,3px'/><vml:textbox inset='1pt,2pt,1pt,1pt' onselectstart='return false;' title='步骤名称:收文登记下一步骤:'><b>2</b><br>收文登记</vml:textbox></vml:roundrect><vml:line mfrID='2' title='' source='2' object='3' from='0,0' to='0,0' style='position:absolute;display:none;z-index:2' arcsize='4321f' coordsize='21600,21600'><vml:stroke endarrow='block'></vml:stroke><vml:shadow on='T' type='single' color='#b3b3b3' offset='1px,1px'/></vml:line><vml:roundrect inset='2pt,2pt,2pt,2pt' id='3'table_id='3'flowType='end' passCount='0' flowTitle='<b>3</b><br>拟办意见' flowFlag='0' readOnly='0' receiverID='' receiverName='' fillcolor='#00EE00' onDblClick='Edit_Process(236);' style='LEFT:200 ; TOP:20; WIDTH: 100; POSITION: absolute; HEIGHT: 50;vertical-align:middle;CURSOR:hand;TEXT-ALIGN:center;z-index:1' arcsize='4321f' coordsize='21600,21600'><vml:shadow on='T' type='single' color='#b3b3b3' offset='3px,3px'/><vml:textbox inset='1pt,2pt,1pt,1pt' onselectstart='return false;' title='步骤名称:拟办意见下一步骤:'><b>3</b><br>拟办意见</vml:textbox></vml:roundrect><vml:line mfrID='3' title='' source='3' object='4' from='0,0' to='0,0' style='position:absolute;display:none;z-index:2' arcsize='4321f' coordsize='21600,21600'><vml:stroke endarrow='block'></vml:stroke><vml:shadow on='T' type='single' color='#b3b3b3' offset='1px,1px'/></vml:line><vml:roundrect inset='2pt,2pt,2pt,2pt' id='4'table_id='4'flowType='end' passCount='0' flowTitle='<b>4</b><br>分办' flowFlag='0' readOnly='0' receiverID='' receiverName='' fillcolor='#00EE00' onDblClick='Edit_Process(236);' style='LEFT:200 ; TOP:200; WIDTH: 100; POSITION: absolute; HEIGHT: 50;vertical-align:middle;CURSOR:hand;TEXT-ALIGN:center;z-index:1' arcsize='4321f' coordsize='21600,21600'><vml:shadow on='T' type='single' color='#b3b3b3' offset='3px,3px'/><vml:textbox inset='1pt,2pt,1pt,1pt' onselectstart='return false;' title='步骤名称:分办下一步骤:'><b>4</b><br>分办</vml:textbox></vml:roundrect><vml:line mfrID='4' title='' source='4' object='5' from='0,0' to='0,0' style='position:absolute;display:none;z-index:2' arcsize='4321f' coordsize='21600,21600'><vml:stroke endarrow='block'></vml:stroke><vml:shadow on='T' type='single' color='#b3b3b3' offset='1px,1px'/></vml:line><vml:roundrect inset='2pt,2pt,2pt,2pt' id='5'table_id='5'flowType='end' passCount='0' flowTitle='<b>5</b><br>批办' flowFlag='0' readOnly='0' receiverID='' receiverName='' fillcolor='#00EE00' onDblClick='Edit_Process(236);' style='LEFT:380 ; TOP:20; WIDTH: 100; POSITION: absolute; HEIGHT: 50;vertical-align:middle;CURSOR:hand;TEXT-ALIGN:center;z-index:1' arcsize='4321f' coordsize='21600,21600'><vml:shadow on='T' type='single' color='#b3b3b3' offset='3px,3px'/><vml:textbox inset='1pt,2pt,1pt,1pt' onselectstart='return false;' title='步骤名称:批办下一步骤:'><b>5</b><br>批办</vml:textbox></vml:roundrect><vml:line mfrID='5' title='' source='5' object='6' from='0,0' to='0,0' style='position:absolute;display:none;z-index:2' arcsize='4321f' coordsize='21600,21600'><vml:stroke endarrow='block'></vml:stroke><vml:shadow on='T' type='single' color='#b3b3b3' offset='1px,1px'/></vml:line><vml:roundrect inset='2pt,2pt,2pt,2pt' id='6'table_id='6'flowType='end' passCount='0' flowTitle='<b>6</b><br>传阅' flowFlag='0' readOnly='0' receiverID='' receiverName='' fillcolor='#00EE00' onDblClick='Edit_Process(236);' style='LEFT:380 ; TOP:200; WIDTH: 100; POSITION: absolute; HEIGHT: 50;vertical-align:middle;CURSOR:hand;TEXT-ALIGN:center;z-index:1' arcsize='4321f' coordsize='21600,21600'><vml:shadow on='T' type='single' color='#b3b3b3' offset='3px,3px'/><vml:textbox inset='1pt,2pt,1pt,1pt' onselectstart='return false;' title='步骤名称:传阅下一步骤:'><b>6</b><br>传阅</vml:textbox></vml:roundrect><vml:line mfrID='6' title='' source='6' object='7' from='0,0' to='0,0' style='position:absolute;display:none;z-index:2' arcsize='4321f' coordsize='21600,21600'><vml:stroke endarrow='block'></vml:stroke><vml:shadow on='T' type='single' color='#b3b3b3' offset='1px,1px'/></vml:line><vml:roundrect inset='2pt,2pt,2pt,2pt' id='7'table_id='7'flowType='end' passCount='0' flowTitle='<b>7</b><br>承办' flowFlag='0' readOnly='0' receiverID='' receiverName='' fillcolor='#00EE00' onDblClick='Edit_Process(236);' style='LEFT:560 ; TOP:20; WIDTH: 100; POSITION: absolute; HEIGHT: 50;vertical-align:middle;CURSOR:hand;TEXT-ALIGN:center;z-index:1' arcsize='4321f' coordsize='21600,21600'><vml:shadow on='T' type='single' color='#b3b3b3' offset='3px,3px'/><vml:textbox inset='1pt,2pt,1pt,1pt' onselectstart='return false;' title='步骤名称:承办下一步骤:'><b>7</b><br>承办</vml:textbox></vml:roundrect><vml:line mfrID='7' title='' source='7' object='8' from='0,0' to='0,0' style='position:absolute;display:none;z-index:2' arcsize='4321f' coordsize='21600,21600'><vml:stroke endarrow='block'></vml:stroke><vml:shadow on='T' type='single' color='#b3b3b3' offset='1px,1px'/></vml:line><vml:roundrect inset='2pt,2pt,2pt,2pt' id='8'table_id='8'flowType='' passCount='0' flowTitle='<b>8</b><br>归档、销毁' flowFlag='0' readOnly='0' receiverID='' receiverName='' fillcolor='#00EE00' onDblClick='Edit_Process(236);' style='LEFT:560 ; TOP:200; WIDTH: 100; POSITION: absolute; HEIGHT: 50;vertical-align:middle;CURSOR:hand;TEXT-ALIGN:center;z-index:1' arcsize='4321f' coordsize='21600,21600'><vml:shadow on='T' type='single' color='#b3b3b3' offset='3px,3px'/><vml:textbox inset='1pt,2pt,1pt,1pt' onselectstart='return false;' title='步骤名称:归档、销毁下一步骤:'><b>8</b><br>归档、销毁</vml:textbox></vml:roundrect><vml:line mfrID='8' title='' source='8' object='9' from='0,0' to='0,0' style='position:absolute;display:none;z-index:2' arcsize='4321f' coordsize='21600,21600'><vml:stroke endarrow='block'></vml:stroke><vml:shadow on='T' type='single' color='#b3b3b3' offset='1px,1px'/></vml:line></div>
    <hr />
    </body>
    </html>
      

  2.   

    那是引文你的页面引用了连个格式标准一个W3C  和VML,所以你的页面不知道以哪个标准格式解析而不能显示