I have given valuable advise from here
But as subject title says I am receiving error in the btnLogin method, related to my previous question but really the same problem
If you are thinking of fetching the user id, you have to combine both the statments in to a single batch
cmd.CommandText = "INSERT INTO LoginLogTable (UserName, LoggedInDate, LoggedInTime) VALUES (@UserName, @LoggedInDate, @LoggedInTime) SELECT @@IDENTITY";