zoukankan      html  css  js  c++  java
  • This control will present the user with an upload file dialog box

    http://www.developerfusion.co.uk/show/3905/2/

    Now that we have a warm, fuzzy place to store our images, lets build a webform to upload our images into the database.

    Enter A Friendly Name <input type=text id=txtImgName runat="server" >
    <asp:RequiredFieldValidator id=RequiredFieldValidator1 runat="server" ErrorMessage="Required" ControlToValidate="txtImgName"></asp:RequiredFieldValidator>
    <br>Select File To Upload:
    <input id="UploadFile" type=file runat=server>
    <asp:button id=UploadBtn Text="Upload Me!" OnClick="UploadBtn_Click" runat="server"></asp:button>
    </form>

    The first interesting point about our webform, is the attribute "enctype". Enctype tells the browser and server that we will be uploading some type of binary data. This binary data needs to be parsed, using a different mechanism from our normal text data. The next control we of interest is the type=file control. This control will present the user with an upload file dialog box. The user browses for the file they want to upload.

  • 相关阅读:
    第六次作业
    第五次作业1
    java第三次作业
    JAVA 第二次作业
    JAVA第一次作业
    第 十一 次作业
    第十次作业
    第九次作业
    第八次作业
    第七次作业
  • 原文地址:https://www.cnblogs.com/cy163/p/276441.html
Copyright © 2011-2022 走看看