onKeyDown='return false;'这个行不?

解决方案 »

  1.   

    onKeyDown='return false;'这个不行啊,加上就出错了。还有没有别的方法??
      

  2.   

    readonly=true
    那不行了,readonly之后就不能点“浏览”了
      

  3.   

    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
      

  4.   

    <asp:FileUpload ID="FileUpload1" ContentEditable="false" runat="server" Width="350px"  onchange='PicChange();' />
    ContentEditable="false"