Hi,
I'm getting this error while running following code.
Server Error in '/' Application.
Object reference not set to an instance of an object.
private void CheckFriendshipStatus()
{
var obj1 = Session["UserId"].ToString();
var obj2 = Session["CurrentProfileId"].ToString();
if (obj1 == obj2)
{
btnAddAsFriend.Visible = false;
}
I also tried private void CheckFriendshipStatus() { if (Object.Equals(Session["UserId"].ToString(), Session["CurrentProfileId"].ToString())) { btnAddAsFriend.Visible = false; }
Praveenu VeenuPosted Mar 10, 2016, 10:36 AM
SaravananPosted Mar 9, 2016, 9:55 AM
Tom MohanPosted Mar 9, 2016, 9:53 AM
lal pPosted Mar 9, 2016, 8:43 AM