I am facing these 2 errors which state that:
Error 1 'ASP.appointment_booknewappointment_aspx' does not contain a definition for 'OnSqlUpdated' and no extension method 'OnSqlUpdated' accepting a first argument of type 'ASP.appointment_booknewappointment_aspx' could be found (are you missing a using directive or an assembly reference?)Appointment\Appointment\BookNewAppointment.aspx 96
Error 2 'ASP.appointment_booknewappointment_aspx' does not contain a definition for 'OnSqlUpdating' and no extension method 'OnSqlUpdating' accepting a first argument of type 'ASP.appointment_booknewappointment_aspx' could be found (are you missing a using directive or an assembly reference?)Appointment\Appointment\BookNewAppointment.aspx 96
My codes seems to be fine but when i run, these 2 errors are shown. I do not really understand as it is my first time trying asp.net transaction.
Here is my .aspx code
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:BORosesConnection %>"
DeleteCommand="DELETE FROM [Appointment] WHERE [ApptID] = @ApptID"
InsertCommand="INSERT INTO [Appointment] ([ApptDate], [ApptStartTime], [ApptEndTime], [WeddingPlanner]) VALUES (@ApptDate, @ApptStartTime, @ApptEndTime, @WeddingPlanner)"
SelectCommand="SELECT * FROM [Appointment]"
UpdateCommand="UPDATE [Appointment] SET [ApptDate] = @ApptDate, [ApptStartTime] = @ApptStartTime, [ApptEndTime] = @ApptEndTime, [WeddingPlanner] = @WeddingPlanner WHERE [ApptID] = @ApptID" DataSourceMode="DataReader" OnUpdated="OnSqlUpdated" OnUpdating="OnSqlUpdating">
<SelectParameters>
<asp:QueryStringParameter Name="ApptID"
QueryStringField="AID" Type="Int32" />
</SelectParameters>
<DeleteParameters>
<asp:QueryStringParameter Name="ApptID" QueryStringField="AID" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:ControlParameter Name="ApptDate" ControlId="TextBox1" Type="String" />
<asp:ControlParameter Name="ApptStartTime" ControlId="ddlStart" Type="String" />
<asp:ControlParameter Name="ApptEndTime" ControlId="ddlEnd" Type="String" />
<asp:ControlParameter Name="WeddingPlanner" ControlId="weddingPlanner" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:ControlParameter Name="ApptDate" ControlId="TextBox1" Type="String" />
<asp:ControlParameter Name="ApptStartTime" ControlId="ddlStart" Type="String" />
<asp:ControlParameter Name="ApptEndTime" ControlId="ddlEnd" Type="String" />
<asp:ControlParameter Name="WeddingPlanner" ControlId="weddingPlanner" Type="String" />
<asp:QueryStringParameter Name="ApptID" QueryStringField="AID" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>