asp.net Êý¾Ý¼¯ ʹÓÃDataObjectTypeName
ÔÚasp.net ʹÓÃÊý¾Ý¼¯Éè¼ÆÆ÷ ·ÃÎÊÊý¾ÝÖÐ˵¹ý£¬ÒªÊ¹Insert,Update,Delete²éѯ¿ÉÓ㬱ØÐëɾ³ýObjectDataSource¶ÔÏó
ÊôÐÔDataObjectTypeNameµÄÖµ¡£ÏÂÃæҪ˵µÄÊÇ£¬ÔÚ²»É¾³ý¸ÃÖµÏÂʹ²éѯ¿ÉÓõķ½·¨¡££¨ÓÉÓÚ֮ǰÔÚɾ³ý
DataObjectTypeNameºóInsert,Update,Delete²éѯһֱµ÷ÊÔ²»³É¹¦£¬ÓÚÊǵ®ÉúÁËÈçÏÂʹÓ÷½·¨¡££©
Óëasp.net ʹÓÃÊý¾Ý¼¯Éè¼ÆÆ÷ ·ÃÎÊÊý¾ÝÏàͬµÄ£¬Ê×ÏÈҪʹÓÃÊý¾Ý¼¯Éè¼ÆÆ÷´´½¨DataSet²¢Ð޸ĺÃTableAdapterµÄInsert£¬Update£¬Delete²éѯ¡£È»ºó´´½¨Á½¸öÀ࣬һ¸öÊǼ̳ÐTableAdapterµÄDataAdapterÀ࣬һ¸öÊÇÓÃÓÚDataObjectTypeNameµÄÆÕͨÀࡣʾÀý´úÂëÈçÏ£º
public class ProductsAdapter : DataSet1TableAdapters.ProductsTableAdapter
{
public ProductsAdapter()
{
//
//TODO: ÔÚ´Ë´¦Ìí¼Ó¹¹Ô캯ÊýÂß¼
//
}
public int Insert(Product product)
{
return base.Insert(product.SerialNum, product.ProductName, product.ClassName, product.ShortPic, product.Pic);
}
public int Update(Product product)
{
return base.Update(product.SerialNum, product.ProductName, product.ClassName, product.ShortPic, product.Pic, product.Id);
}
public int Delete(Product product)
{
return base.Delete(product.Id);
}
}
public class Product
{
private Guid id;
public Guid Id
{
get { return id; }
set { id = value; }
}
private string serialNum;
public string SerialNum
{
get { return serialNum; }
set { serialNum = value; }
}
private string productName;
public string ProductName
{
get { return productName; }
set { productName = value; }
}
private string className;
public string ClassName
{
get { return className; }
set { className = value; }
}
private string shortPic;
public string ShortPic
{
get { return shortPic; }
set { shortPic = value; }
}
private string pic;
public string Pic
{
get { return pic; }
set { pic = value; }
}
}
×îºó»¹ÐèÒª¼
Ïà¹ØÎĵµ£º
ÒòΪ¹«Ë¾µÄ²úÆ·ÓÃasp¿ª·¢£¬ Ç°Ò»¶Îʱ¼äÓÃaspдÁËÒ»¸öÉú³É¾²Ì¬Ò³Ãæ²¢·ÖÒ³µÄ³ÌÐò£¬µ«ÔµÓÚ¶Ô.netµÄÈÈ°®£¬Ð´ÁËÕâ¸ö.netϵÄÉú³É¾²Ì¬Ò³Ãæ²¢·ÖÒ³µÄ³ÌÐò¡£
Ö÷ÒªµÄÔÀí¾ÍÊÇÌ滻ģ°åÀïµÄÌØÊâ×Ö·û¡£
1¡¢¾²Ì¬Ä£°åÒ³Ãæ template.html£¬Ö÷ÒªÊǶ¨ÒåÁËһЩÌØÊâ×Ö·û£¬ÓÃÀ´±»Ìæ»»¡£
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Tran ......
http://www.cnblogs.com/wyforumid/archive/2008/05/14/1196155.html
Ê×ÏȶÔÒÔÉϵÄÔ´´Õß˵¶Ô²»ÆðÏ£¬Î´¾Í¬Òâ¾Í¸ÄÁËËûµÄÔ´Â룬»¹°Ñ¸ÄºóµÄÔ´Âë·¢³öÀ´¡£
Ö÷Òª¸ÄµÄµØ·½¾ÍÊǵØÖ·À¸ÀïµÄ¶«¶«ÁË£¬ÔÎÄ¿ÉÒÔ¿´ÒÔÉϵģ¬ÎÒÌùÉÏ×Ô¼º¸ÄºóµÄÔ´Âë°É
Default.aspxÎļþ
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="D ......
ÔÎÄת×Ô£ºIT¹¤³Ì¼¼ÊõÍø,http://www.systhinker.com/index.php?action-viewnews-itemid-10320-php-1
ASP.NET 4.0ÊÇASP.NETµÄ×îа汾£¬Ëü¼¯³ÉÓÚ.NEt¿ò¼Ü4.0ÖС£ÔÚÕâÀïÎÒÃǽ«Ò»Æð̽¾¿Ò»Ï£¬ÎÒÈÏΪ×î¾ßASP.NET 4.0ÌØÐÔµÄÆ߸ö·½Ãæ¡£
ASP.NET 4.0Ìṩ¶ÔÍøÕ¾ÒÔ¼°ÍøÂçÓ¦ÓÃÏîÄ¿µÄÖ§³Ö·þÎñ¡£Ä¬ÈϵÄASP.NETÓ¦ÓóÌÐòÌṩÁËÒ»¸ö±È½ ......
if (FileUpload1.HasFile)
{
string fileContentType = FileUpload1.PostedFile.ContentType;
&n ......
Ç°Ç°ºóºóÊÕµ½¹ýһЩѧÉúµÄÀ´ÐÅ£¬Ñ¯ÎÊASP.NETµÄѧϰ˳ÐòÎÊÌ⣬Ôڴ˾ÍÏò´òËãϵͳѧϰASP.NET¼¼ÊõµÄ³õѧÕß̸̸ÎҵĽ¨Òé¡£
Èç¹ûÄãÒѾÓн϶àµÄÃæÏò¶ÔÏ󿪷¢¾Ñ飬Ìø¹ýÒÔÏÂÕâÁ½²½£º
µÚÒ»²½¡¡ÕÆÎÕÒ»ÃÅ.NETÃæÏò¶ÔÏóÓïÑÔ£¬C££»òVB.NET¡£
ÎÒÇ¿ÁÒ·´¶ÔÔÚûϵͳѧ¹ýÒ»ÃÅÃæÏò¶ÔÏó£¨OO£© ......