The stored procedure you posted does not seem to match with the C# code you posted earlier.
---- STORED PROC--------
ALTER PROCEDURE [dbo].[InsertResource]
(
@Name nvarchar(256),
@Path nvarchar(256),
@Date datetime2(7),
@UserName nvarchar(256)
)
------ C# CODE --------
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
SqlCommand cmd = new SqlCommand("Insert", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@Name", SqlDbType.NVarChar).Value = TextBox1.Text;
cmd.Parameters.Add("@Date", SqlDbType.DateTime2.ToString()).Value = DateTime.Now.ToString();
1. Stored proc name is InsertResource, but your C# code is using the name "Insert".
2. Stored proc requires four parameters, @Name, @Path, @Date, @Username. But the C# code is supplying only two parameters.
If you deleted some of the variables from the C# code, you need to alter the stored procedure to match that.