Posted on: 10/19/2012 1:35:06 AM | Views : 425

In an attempt to understand how to use it. I have created a class that has all CRUD ops. then created a delete button in aspx page that once a user click onit it should invoke the delete method in the BL.class. I am stuck and not able to fire the delete method. I revisit the code again and again, not been able to identify the cause of the error. Bob. Code in BL.Class -------------- public int Delete(int TagId) { using (conn) { SqlCommand cmd = new SqlCommand("DELETE FROM rgn_Tags WHERE TagId=@TagId", conn); cmd.Parameters.AddWithValue("TagId", TagId).DbType = DbType.Int16; conn.Open(); int rowsAffected = cmd.ExecuteNonQuery(); return rowsAffected; } } code in aspx page -------------------- <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" TypeName="BL.SampleData" DeleteMethod="Delete" ondeleting= ...

Go to the complete details ...