asp.net图片上传 [英] asp.net photo upload

查看:60
本文介绍了asp.net图片上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用文本框,按钮和图像控件上传照片或图像,我为编写代码而震惊

字符串查询=插入可查询的值(""+ TxtPhoto.Text +"'');

对于插入查询我写txtphoto.将照片存储在数据库中,然后
创建名为enquirytable的表,因为我将图像数据类型设置为二进制

请帮助我;我认为以下我的页面设计代码将对您有所帮助...

how to upload photo or image using textbox,button and image control, i struck at writing code
at
string query =insert into enquirytable values("''" +TxtPhoto.Text+"''");

for a insert query what i write txtphoto.? for photo to store in database, and
create table called enquirytable in that i gave image datatype as binary

pls help me out; i think below sorce code of my page design will help u ......

<form id="form1"  runat="server">
    <div align="center">
    
 <asp:Image ID="Imgstudent" runat="server" 

            Height="100px" Width="128px" />
     </div>
    <table class="style1">
        <tr>
            <td align="right" class="style3">
                Photograph</td>
            <td class="style2">
       <asp:TextBox ID="TxtPhoto" runat="server">
                            </td>
            <td>
   <asp:Button ID="BtnBrowse" runat="server" Font-Bold="True" Text="Browse" 

                                    Width="115px" />
     </td>
        </tr>
        <tr>
            <td class="style3">
                 </td>
            <td class="style2">
                 </td>
            <td>
                 </td>
        </tr>
    </table>
    </form>

推荐答案

此处介绍了将图像从ASP.net上传到db的主题.

将图像保存到SQL Server 2000数据库 [
Here is an article that cover the subject of image uploading from ASP.net to db

Save An Image Into SQL Server 2000 Database[^]


Google是您的朋友.在将图像保存到SQL Server 2000数据库 [在SQL Server中存储或保存图像 [ http://www.shabdar.org/sql-server/105-store-save-images-in-sql-server.html [ http://www.vbdotnetheaven.com/UploadFile/scottlysle/ImageToSqlServer11242006025136AM/ImageToSqlServer.aspx [a> [ ^ ]
Google is your friend. A simple search on How to save an image in sql server returned 17.9 million results.
The first 4 links that appeared are below.
I would suggest that you need to learn to formulate simple and good search queries and use the power of google first.

Save An Image Into SQL Server 2000 Database[^]
Store or Save images in SQL Server[^]
http://www.shabdar.org/sql-server/105-store-save-images-in-sql-server.html[^]
http://www.vbdotnetheaven.com/UploadFile/scottlysle/ImageToSqlServer11242006025136AM/ImageToSqlServer.aspx[^]


浏览给定的链接
使用ASP.NET FileUpload Control在数据库中保存图像[ FileUpload在ASP.NET C#VB.NET中将图像保存在数据库中[ ^ ]
Have a go through given links
Saving images in database using ASP.NET FileUpload Control[^]
FileUpload Save Images in Database in ASP.NET C# VB.NET[^]


这篇关于asp.net图片上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆