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
It appears that you may have an error in your code. You set the Text of the cmd to the first line, then completely replace it with the second one:
cmd.CommandText = "INSERT INTO LoginLogTable (UserName, LoggedInDate, LoggedInTime) VALUES (@UserName, @LoggedInDate, @LoggedInTime)";
cmd.CommandText = "SELECT @ID = @@IDENTITY";
So you are effectively only executing:
cmd.CommandText = "SELECT @ID = @@IDENTITY";