易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net对图片的读写

 写图片c:\1.jpg到表cinfo中
private static void AddCinfo()
    {
        string strSql = "insert into cinfo (srvtitle,csttitle,introduction,logo) values
(@srvtitle,@csttitle,@introduction,@logo)";
        SqlParameter[] parms =
        {
            new SqlParameter("@srvtitle",SqlDbType.VarChar,30),
            new SqlParameter("@csttitle",SqlDbType.VarChar,30),
            new SqlParameter("@introduction",SqlDbType.NVarChar,500),
            new SqlParameter("@logo",SqlDbType.Image)
        };
        parms[0].Value = "旅业互动";
        parms[1].Value = "lyhd";
        parms[2].Value = "简介";
        string filePath = @"c:\1.jpg";
        FileStream fs = File.OpenRead(filePath);
        byte[] content = new byte[fs.Length];
        fs.Read(content, 0, content.Length);
        fs.Close();
        parms[3].Value = content;
        DBHelper.ExecuteNonQuery(CommandType.Text, strSql, parms);
    }
读取图片的页面 test.aspx
protected void Page_Load(object sender, EventArgs e)
    {
        string strSql = "select * from cinfo where id=1";
        SqlDataReader reader=DBHelper.ExecuteReader(CommandType.Text, strSql, null);
 


相关文档:

Discuz!NT与asp.net整合集成实例教程

由于项目需要一个论坛,本来有CS的,在.net下很出名的国外开源论坛。但为了适应国内的风气,最后选用在国内如日中天的Discuz!NT。
将Discuz与asp.net开发的网站整合,有很多人已经完成了。
但在网上没有找到较详细的描述。方法倒是有很多种。
在项目中注册新用户时,也同时调用论坛的用户注册,这样就同步注册了。至于删 ......

asp.net向文件写入日志

 using System;
using System.IO;
namespace WriteLog
{
    /// <summary>
    /// WriteInLog 的摘要说明。
    /// </summary>
    public class WriteInLog
......

在UpdatePanel上使用FileUpload上传文件 (asp.net C#)

 
首先我很遗憾的告诉大家,因为微软的偷懒,目前UpdatePanel还不支持文件上传。变相的解决办法就是UpdatePanel中设置PostBackTrigger:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:FileUpload ID="FileUpload1" runat="serv ......

优秀ASP.NET程序员的修炼之路


<!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@宋体" ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号