小编mhi*_*eth的帖子

在C#中从SQL Server流式传输VARBINARY数据

我正在尝试使用ASP.Net提供存储在数据库中VARBINARY(MAX)字段中的图像数据.现在,代码填充数据表,然后将字节数组拉出DataRow并将字节数组推送到响应中.我想知道是否有办法将数据从SQL Server或多或少地流入响应,而不必围绕这些巨大的字节数组进行编组(因为图像很大,它们会导致OutOfMemoryExceptions).是否有类/机制?

当前代码看起来或多或少像:

DataTable table = new DataTable();
SqlDataAdapter adapter = new SqlDataAdapter(commandText, connectionString);
adapter.Fill(table);
DataRow row = table.Rows[0];
byte[] imageData = row[0] as byte[];
if(imageData != null)
{
  Response.Clear();
  Response.BinaryWrite(imageData);
  Response.End();
}
Run Code Online (Sandbox Code Playgroud)

在此先感谢 - 任何帮助表示赞赏.

c# sql stream varbinary

12
推荐指数
1
解决办法
2万
查看次数

IE9 RTW是否支持输入元素的占位符属性?

一堆网站在IE9中提到支持,但我认为这是出现在Betas或RC中的东西.它似乎在IE9最终版本中不受支持.有人能证实吗?

html5 input placeholder rtw internet-explorer-9

8
推荐指数
1
解决办法
9406
查看次数

如何使用特征检测来了解浏览器是否支持border-radius?(包括IE9)

我已经看到很多用于检测边界半径支持的示例,例如:

var cssAttributeNames = ['BorderRadius', 'MozBorderRadius', 'WebkitBorderRadius', 'OBorderRadius', 'KhtmlBorderRadius']; 
for (var i = 0; i < cssAttributeNames.length; i++) {
    var attributeName = cssAttributeNames[i];
    if (window.document.body.style[attributeName] !== undefined) {
        this._useCss = true;
        break;
    }
}
Run Code Online (Sandbox Code Playgroud)

但这似乎不适用于支持border-radius的IE9.我错过了什么吗?

javascript css3 feature-detection internet-explorer-9

7
推荐指数
1
解决办法
1284
查看次数