Asp.net web api 你能帮我创建asp.net注册页面吗

Asp.net web api 你能帮我创建asp.net注册页面吗,asp.net-web-api,Asp.net Web Api,错误:System.Data.SqlClient.SqlException 0x80131904:无法将值NULL插入表“C:\USERS\REGE\DOCUMENTS\VISUAL STUDIO 2013\WEBSITES\LOGINPAGE1\APP_Data\REGISTRATION.MDF.dbo.UserData”的列“Id”;列不允许空值。插入失败。声明已终止。在System.Data.SqlClient.SqlConnection.OnErrorSqlException异常处,布尔

错误:System.Data.SqlClient.SqlException 0x80131904:无法将值NULL插入表“C:\USERS\REGE\DOCUMENTS\VISUAL STUDIO 2013\WEBSITES\LOGINPAGE1\APP_Data\REGISTRATION.MDF.dbo.UserData”的列“Id”;列不允许空值。插入失败。声明已终止。在System.Data.SqlClient.SqlConnection.OnErrorSqlException异常处,布尔断开连接,在System.Data.SqlClient.SqlInternalConnection.OnErrorSqlException异常处的Action1 wrapCloseInAction,布尔断开连接,在System.Data.SqlClient.TdsParserStateObject StateObjection处的Action1 wrapCloseInAction,布尔调用者连接锁,System.Data.SqlClient.TdsParser.TryRunbehavior runBehavior处的布尔异步关闭,SqlCommand cmdHandler,SqlDataReader数据流,BulkCopySimpleResultSet bulkCopyHandler,TdsParserStateObject stateObj,System.Data.SqlClient.SqlCommand.FinishExecuteReaderSqlDataReader ds处的布尔和dataReady,RunBehavior RunBehavior,String ResetOptionString at System.Data.SqlClient.SqlCommand.RunExecuteReaderDsCommandBehavior cmdBehavior,RunBehavior RunBehavior,Boolean async,Int32超时,任务和任务,Boolean asyncWrite,SqlDataReader ds at System.Data.SqlClient.SqlCommand.RunExecuteReaderCommandBehavior cmdBehavior,RunBehavior RunBehavior Boolean returnStream String方法TaskCompletionSource1 completion Int32 timeout Task&Task Boolean asyncWrite at System.Data.SqlClient.SqlCommand.InternalExecuteOnQueryTaskCompletionSource1 completion String方法名Boolean sendToPipe Int32 timeout,Boolean asyncWrite at System.Data.SqlClient.SqlCommand.ExecuteOnQuery at Registration.Button1_ClickObject sender,事件参数e在c:\Users\rege\Documents\Visual Studio 2013\WebSites\Loginpage1\Registration.aspx.cs中:第39行ClientConnectionId:53472e69-8d36-4409-b2bc-92fd8344be27 用户名 电子邮件 暗语 确认密码 国家

请有人帮帮我这个程序有什么问题,因为我现在是个程序员
感谢

基本上,例外情况是在插入记录时没有包含Id列的值

如果Id数据类型为int,则可能是您忘记将其设置为


这是一个相当明显的错误。显然,您正试图在Id列中插入NULL,这是不允许的。