 |
|
ใช้ formview เป็นตัว insert ข้อมูลอะครับ แต่พอกรอกเสร็จกด ตกลง ผลก็ออกมาเป็นแบบนี้ครับ
Server Error in '/Project' Application.
--------------------------------------------------------------------------------
Inserting is not supported by data source 'SqlDataSource1' unless InsertCommand is specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NotSupportedException: Inserting is not supported by data source 'SqlDataSource1' unless InsertCommand is specified.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NotSupportedException: Inserting is not supported by data source 'SqlDataSource1' unless InsertCommand is specified.]
System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary values) +1645804
System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +86
System.Web.UI.WebControls.FormView.HandleInsert(String commandArg, Boolean causesValidation) +272
System.Web.UI.WebControls.FormView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +676
System.Web.UI.WebControls.FormView.OnBubbleEvent(Object source, EventArgs e) +95
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.FormViewRow.OnBubbleEvent(Object source, EventArgs e) +113
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +118
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4955
Tag : .NET, Ms SQL Server 2008, Web (ASP.NET), C#, VS 2008 (.NET 3.x)
|
|
 |
 |
 |
 |
Date :
2011-09-02 20:54:17 |
By :
kame123 |
View :
1369 |
Reply :
3 |
|
 |
 |
 |
 |
|
|
|
 |