lilyguaiguai 发表于 2008-9-2 14:22

asp.net 如何读取一系列动态生成的<input type=text>的值

多谢:)

hebingbing 发表于 2008-9-2 15:25

html的控件在后台没有办法获取,要加上service或者用JavaScript获取吧……

青格儿 发表于 2008-9-2 19:23

如果加个这个属性runat="server",那后台就可以读了。

ycbbg 发表于 2008-9-3 17:01

function addFileControl()
    {
        var str = '<br/><INPUT type="file" NAME="File" id="File">'
        document.getElementById('FileCollection').insertAdjacentHTML("beforeEnd",str)
    }
    </script>

然后调用即可

页: [1]

编程论坛