开发者

File upload using HTML file type

开发者 https://www.devze.com 2023-01-02 22:52 出处:网络
I want to upload a file on my aspx page. I am using <form id=\"frmId\" method=\"post\" enctype=\"Multipart/form-data\">

I want to upload a file on my aspx page.

I am using

<form id="frmId" method="post" enctype="Multipart/form-data">
<input type="file" id="file1"/>
<input type="submit" id="btnsubmit"/>
</form>

and in code behind I am trying to get this file. Its not letting me to get the file until I use server side input file开发者_开发技巧 control. I don't want to use runat="server" attribute with my file control.

Do anyone know how to do this.


Have you tried the Request.Files collection?


You can not access control on server side code with out runat="server" attribute.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号