Q: 对SQL server数据库里取image类型怎么取??? A:把aspx的html元素去掉,然后页面中调用以下函数。这个页面返回的就是图片 private void DownloadImage( string FileID) ... { using (System.Data.SqlClient.SqlConnectionconn = new System.Data.SqlClient.SqlConnection()) ... { conn.ConnectionString = " ..... " ; conn.Open(); using (System.Data.SqlClient.SqlCommandcommand = conn.CreateCommand()) ... { command.CommandText = string .Format( " selectImageSize,Imagefromtablexxxwhereid='{0}' " ,FileID); System.Data.SqlClient.SqlDataReaderreader = command.ExecuteReader(); try ... { if (reader.Read()) ... { int size = reader.GetInt32( 0 ); byte []buffer = new byte [size]; reader.GetBytes( 1 , 0 ,buffer, 0 ,size); this .Response.BinaryWrite(buffer); } } catch (Exceptionex) ... { this .Response.Write(ex.Message); } finally ... { reader.Close(); } } conn.Close(); } }