Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C#¶ÁÈ¡sqlserver ¶¯»­flash swf Îļþµ½±¾µØÓ²ÅÌ

 using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.IO;
public partial class Default3 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        //°ÑͼƬ±£´æ³ÉÊý¾Ý¿â¶þ½øÖÆÐÎʽ
        Stream ImageStream;
        string Path = FileUpload1.PostedFile.FileName;// ÎļþÃû³Æ
        int Size = FileUpload1.PostedFile.ContentLength; // Îļþ´óС
        string Type = FileUpload1.PostedFile.ContentType; // ÎļþÀàÐÍ
        ImageStream = FileUpload1.PostedFile.InputStream;
        byte[] Content = new byte[Size];
        int Status = ImageStream.Read(Content, 0, Size);
        SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
        SqlCommand comm = new SqlCommand("insert into testimage (UserName,Image,Path,Type) values(@UserName,@Image,@Path,@Type)", conn);
        comm.CommandType = CommandType.Text;
        comm.Parameters.Add("@UserName", SqlDbType.VarChar, 255).Value = txtUserName.Text;
        comm.Parameters.Add("@Image", SqlDbType.Image).Value = Content;
        comm.Parameters.


Ïà¹ØÎĵµ£º

ϸ½Ú¡¡sqlserver µÄntextÀàÐÍÔÚÊý¾Ý¿âÖÐÊÇ¿´²»µ½ÖµµÄ

 sqlserver µÄntextÀàÐÍÔÚÊý¾Ý¿âÖÐÊÇ¿´²»µ½ÖµµÄ
Æð³õÎÒ»¹ÒÔΪÊý¾ÝûÓвåÈ룬ºóÀ´²ÅÖªµÀntextÀàÐÍÔÚÊý¾Ý¿âÖб¾À´¾Í¿´²»µ½µÄ£¨Êý¾Ý½Ï¶ÌµÄ¿ÉÒÔ¿´µ½£©£»
ÄÇÎÒÒªÏë¿´µ½ntextÊý¾ÝÔõô°ì£¿
ÔÚ²éѯ·ÖÎöÆ÷ÖпÉÒÔ¿´µ½£¨²éѯ·ÖÎöÆ÷ÖÐÒ²Ö»¿´µ½ÁËÇ°¼¸Ê®¸ö×Ö·û£¬¡¡²»ÊÇÈ«²¿µÄ£© ......

C#ºÍJavaScriptµÄ¼òµ¥»¥½»

 
1.asp.netºô½Ðjs
   
                     Response.Write("<script language=javascript>");
              ......

ÓÃC# ʵÏÖC/SģʽÏÂÈí¼þ×Ô¶¯ÔÚÏßÉý¼¶

 Õª   Òª£º
¡¡±¾ÎÄÕë¶ÔÄ¿Ç°C/SģʽϱàдµÄÓ¦ÓóÌÐò¿Éά»¤ÐÔ²îµÄÌص㣬Ìá³öÁËÒ»Ì××Ô¶¯ÔÚÏßÉý¼¶µÄ½â¾ö·½°¸£¬·ÖÎöÁËÔÚÏßÉý¼¶µÄÀ§ÄѼ°ÊµÏÖÔ­Àí£¬²¢¸ø³öÁËʵÏÖÉý¼¶µÄ²¿·Ö´úÂ룬¾ßÓÐʵ¼Ê²Î¿¼¼ÛÖµºÍÏÖʵÒâÒå¡£±¾ÎijÌÐò´úÂë¾ùÔÚ.Net Framework 1.1 ºÍWindows2000ϲâÊÔͨ¹ý¡£
¡¡¹Ø¼ü´Ê£ºC#£»ÔÚÏßÉý¼¶£»×Ô¶¯Éý¼¶£ ......

c# ²Ù×÷ sqlite

  SQLiteÊÇÒ»¸ö¾«ÇɵÄÇáÁ¿¼¶Êý¾Ý¿â£¬½ñÌìÖÕÓÚ»ù±¾ÕÆÎÕÁËÈçºÎÓÃC#²Ù×÷SQLiteÊý¾Ý¿â¡£¸ù¾ÝÍøÓÑÃǵľ­Ñ飬ÖÁÉÙÓÐÁ½ÖÖ·½·¨¿ÉÒÔ×öµ½SQLiteµÄµ÷Óã¬Ò»ÖÖÊǵ÷ÓÃsqlite3.dll£¬Ò»ÖÖÊÇÓÃSystem.Data.SQLite£¬¼´sqlite.ADO.NET,ÊÇרΪC sharp·â×°µÄsqliteº¯Êý£¬ºÜÁ÷ÐС£
        ¼òµ¥Ãè ......

c# SQLÊý¾Ý¿âÔ¶³ÌÁ¬½Ó¼°ÅäÖ÷½·¨

Ò»£ºC# Á¬½ÓSQLÊý¾Ý¿â
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
Server=myServerAddress;Database=myDataBase;User ID=myUse ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ