after ReadByte, the position is moved too, so you don't need to move the Position manuall, tryint n = File1.PostedFile.ContentLength;
if (n>10)
n = 10;byte[] bs = new byte[n];
File1.PostedFile.InputStream.Read(bs,0,n);
if (n>10)
n = 10;byte[] bs = new byte[n];
File1.PostedFile.InputStream.Read(bs,0,n);
解决方案 »
- devexpress richeditcontrol的字体设置
- 取gridview 值的问"题指定的参数已超出有效值的范围"
- 我在c#调试模式中出现的问题提示“没有可用于当前位置的源代码”
- 错误:SQL语句结尾之后找到字符,怎么处理?
- winform 子窗体向父窗体传值的问题
- VS 2010 未能找到类型或命名空间名称“DataTable”(是否缺少 using 指令或程序集引
- 如何使WinForm中的DataGridView里的每行可以显示图片,按钮,等项?
- C#Windows Form的DataGrid问题....
- 【分享】几个实用的扩展方法
- 请问如何在C#中调用Win32API函数?对于Win32API中的一些数据类型
- 俺想在http头中加中文的内容,到了客户端总错误的按utf8解析,咋办啊你说?
- Web程序类似Outlook的Bar控件
and as you said,before you use the HelloWorld2(byte [] ss),you still need to the whole input stream ,it means you still need to read the whole file! right?but thank you all the same!