服务器端FileUpload上传控件如何禁止手动输入并且不能张贴??
禁止手动输入到可以用onkeydown="event.returnValue=false;" onpaste="return false"
这两句实现了就是还可以张贴,要怎么才能禁止张贴? --------------------编程问答-------------------- onKeyDown='return false;'
这个行不? --------------------编程问答-------------------- onKeyDown='return false;'
这个不行啊,加上就出错了。还有没有别的方法?? --------------------编程问答-------------------- readonly=true --------------------编程问答-------------------- readonly=true
那不行了,readonly之后就不能点“浏览”了 --------------------编程问答-------------------- Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
If FileUpload1.HasFile = True Then
Response.Write("OK")
Label1.Text = FileUpload1.PostedFile.FileName
Label2.Text = FileUpload1.PostedFile.ContentLength
Label3.Text = FileUpload1.PostedFile.ContentType
Label4.Text = "上传成功"
FileUpload1.PostedFile.SaveAs(path & FileUpload1.FileName)
FileUpload1.Visible = False
Button1.Visible = False
Else
Response.Write("NO file ")
'FileUpload1.Attributes.Add("onpropertychange", "test2();")
End If
End Sub --------------------编程问答-------------------- 顶 --------------------编程问答-------------------- <asp:FileUpload ID="FileUpload1" ContentEditable="false" runat="server" Width="350px" onchange='PicChange();' />
ContentEditable="false" --------------------编程问答-------------------- 一群菜鸟
补充:.NET技术 , ASP.NET