放一个literal控件,动态加载显示图片的这句话
<IMG width="这里是要显示的%数" heigh="20" src="http://123">'

解决方案 »

  1.   

    不大,清楚,请这位兄弟说的清楚点!
    看我的程序代码!index.aspx.vb页面:    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            '在此处放置初始化页的用户代码
            Dim objcmd As SqlCommand
            Dim objcon As SqlConnection
            Dim objdr As SqlDataReader
            Dim strsql As String
            Dim x1, x2, x3, x4, xcount
            objcon = New SqlConnection("server='127.0.0.1';uid=sa;pwd=123;database=dcdatabase")
            objcon.Open()
            strsql = "select * from result"
            objcmd = New SqlCommand(strsql, objcon)
            objdr = objcmd.ExecuteReader
            If objdr.Read() Then
                x1 = CInt(objdr("result1").ToString())
                x2 = CInt(objdr("result2").ToString())
                x3 = CInt(objdr("result3").ToString())
                x4 = CInt(objdr("result4").ToString())
                xcount = x1 + x2 + x3 + x4
                Label1.Text = "总共" + CStr(xcount) + "张投票"
                x1 = CByte(x1 / xcount * 100)
                x2 = CByte(x2 / xcount * 100)
                x3 = CByte(x3 / xcount * 100)
                x4 = CByte(x4 / xcount * 100)
                lbl1.Text = CStr(x1) + "%" + "&nbsp;&nbsp;" + objdr("result1").ToString()
                lbl2.Text = CStr(x2) + "%" + "&nbsp;&nbsp;" + objdr("result2").ToString()
                lbl3.Text = CStr(x3) + "%" + "&nbsp;&nbsp;" + objdr("result3").ToString()
                lbl4.Text = CStr(x4) + "%" + "&nbsp;&nbsp;" + objdr("result4").ToString()
            End If
            objdr.Close()
            objcon.Close()
        End Subx1,x2,x3,x4为显示的人数换算出来的%比!
    怎么样在index.aspx中按照x1,x2,x3,x4宽度的图片?
      

  2.   

    用<hr width=票数*比例基数>
      

  3.   

    太细!
    <hr width=票数*比例基数 size=10 color=red>