To send the user ID from the ASPX login page to the controller class, you can utilize the ASP.NET session state to store and retrieve the user ID. In the ASPX.CS file, after successful login, store the user ID in the session:
Session["UserID"] = loggedInUserID;
Then, in your controller class, retrieve the user ID from the session:
int userID = Convert.ToInt32(Session["UserID"]);
You can then use this userID
to insert the user ID into your table. Ensure to handle cases where the session might be null or expired.