An SqlParameter with ParameterName '@UserId' is not contained by this SqlParameterCollection

后端 未结 4 1678
清酒与你
清酒与你 2021-01-15 14:36

I had a login page. once user successfuly logged in, they can view and manage their profile/information. This would be done by retrieving data from database and display on a

4条回答
  •  北海茫月
    2021-01-15 15:25

    Create a new SqlParameter and add it to the collection.

    SqlParameter param = new SqlParameter("@UserId", currentUserId);
    e.Command.Parameters.Add(param);
    

提交回复
热议问题