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

asp.net µ¼³öExcel

public bool SaveExcel(GridView paramGridView)
{
if (paramGridView.Rows.Count == 0)
{
return false;
}
//´´½¨Excel¶ÔÏó
Microsoft.Office.Interop.Excel.Application myExcel = new Microsoft.Office.Interop.Excel.Application();
myExcel.Application.Workbooks.Add(true);
myExcel.Visible = true;
//Éú³É×Ö¶ÎÃû³ÆÁÐÃû
for (int i = 0; i < paramGridView.Columns.Count; i++)
{
//µÚ¶þÐеڶþÁпªÊ¼Â¼Èë
myExcel.Cells[2, i + 2] = paramGridView.Columns[i].HeaderText;
}
//Ìî³äÊý¾Ý
for (int i = 0; i < paramGridView.Rows.Count; i++)
{
for (int j = 0; j < paramGridView.Columns.Count; j++)
{
if (paramGridView.Rows[i].Cells[j].Text != null)
{
myExcel.Cells[i + 3, j + 2] = "'" + paramGridView.Rows[i].Cells[j].Text.ToString();
}
}
}
return true;
}
protected void btnPrint_Click(object sender, EventArgs e)
{
SaveExcel(grdvMessage);
}


Ïà¹ØÎĵµ£º

asp.net ÉÏ´«Îļþ

  if (FileUpload1.HasFile)
            {
                string fileContentType = FileUpload1.PostedFile.ContentType;
       &n ......

ASP.NETÖÐÉÏ´«Îļþµ½Êý¾Ý¿â

SQL½Å±¾£º
CREATE TABLE tblBooksUpload
(
¡¡DocID int NOT NULL IDENTITY Primary Key ,
¡¡DocTitle varchar (200) ,
¡¡Doc image,
¡¡DocType varchar (50) ,
¡¡Entrydate datetime Default GetDate()
)

Ê×ÏÈÎÒÃÇҪʵÏÖÓû§ÔÚä¯ÀÀÆ÷¶Ë×ÔÓÉÑ¡ÔñÎļþ£¬È»ºóÉÏ´«£¬ÕâÀïÓû§Ñ¡ÔñÎļþ£¬µ±È»ÊÇÒªÇó±ê×¼µÄWindows·½Ê½£ ......

asp.net Êý¾Ý¼¯ ʹÓÃDataObjectTypeName

ÔÚasp.net ʹÓÃÊý¾Ý¼¯Éè¼ÆÆ÷ ·ÃÎÊÊý¾ÝÖÐ˵¹ý£¬ÒªÊ¹Insert,Update,Delete²éѯ¿ÉÓ㬱ØÐëɾ³ýObjectDataSource¶ÔÏó
ÊôÐÔDataObjectTypeNameµÄÖµ¡£ÏÂÃæÒªËµµÄÊÇ£¬ÔÚ²»É¾³ý¸ÃÖµÏÂʹ²éѯ¿ÉÓõķ½·¨¡££¨ÓÉÓÚ֮ǰÔÚɾ³ý
DataObjectTypeNameºóInsert,Update,Delete²éѯһֱµ÷ÊÔ²»³É¹¦£¬ÓÚÊǵ®ÉúÁËÈçÏÂʹÓ÷½·¨¡££©
Óëasp.net Ê¹Ó ......

asp.netÖÐÓÃsoapheader×÷ÑéÖ¤µÄʹÓò½Ö裺 ºÜ¼òµ¥

Asp.netÒ³ÃæÖе÷ÓÃÒÔSOAPÍ·×÷ÑéÖ¤µÄweb services²Ù×÷²½Ö裺
µÚÒ»²½£ºÓÃÀ´×÷SOAPÑéÖ¤µÄÀà±ØÐë´ÓSoapHeaderÀàÅÉÉú£¬ÀàÖÐPublicµÄÊôÐÔ½«³öÏÖÔÚ×Ô¶¯²úÉúXML½ÚµãÖУ¬¼´£º
<soap:Header>
    <UserSoapHeader xmlns="http://tempuri.org/">
      <UserName>strin ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ