The name “'IMGUserLabel' does not exist in the current context”

Plutannuags

New Member
This is where the IMGUserlabel is located at in the .Apsx :
2TYDV.png
This is the Aspx.Cs : \[code\] public void GetUserDetails(int id){ string getUserDetail = "Select ID,Email,Name,Country,Convert(varchar (20), RegisterDate, 106) RegisterDate,Convert(varchar (20), LastLogin, 106) LastLogin ,Description,ImageName FROM [User] where Id='" + id + "'"; dt = dbClass.ConnectDataBaseReturnDT(getUserDetail); if (dt.Rows.Count > 0) { IMGUserLabel.Text = dt.Rows[0]["Name"].ToString(); NameLabel.Text = dt.Rows[0]["Name"].ToString(); UserImage.ImageUrl = "~/UserImage/" + dt.Rows[0]["ImageName"].ToString(); lblCreated.Text = dt.Rows[0]["RegisterDate"].ToString(); LabelLastLogin.Text = dt.Rows[0]["LastLogin"].ToString(); lblCreated.Text = dt.Rows[0]["RegisterDate"].ToString(); LabelAboutMe.Text = dt.Rows[0]["Description"].ToString(); }}\[/code\]And The Error is Displayed : The name "'IMGUserLabel' does not exist in the current context" However the other labels display the data correctly
 
Back
Top