Hi
I want if it is null then space should be displaed else value
C#
ltrlMentorRatingId.Text = Result.MentorRatingID.ToString();Thanks
Hi
I want if it is null then space should be displaed else value
ltrlMentorRatingId.Text = Result.MentorRatingID.ToString();Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Pasang TamangRank #449 · 5.6K reputationPosted Jan 21, 2023, 3:10 AM EST
Hi,
Please check below code example.
ltrlMentorRatingId.Text = string.IsNullOrEmpty(Result.MentorRatingID.ToString()) ? "" : Result.MentorRatingID.ToString();Regards,
Pasang
Naimish MakwanaRank #324 · 7.7K reputationPosted Jan 21, 2023, 3:27 AM EST
Hi,
Please use below code.
ltrlMentorRatingId.Text = string.IsNullOrEmpty(Result.MentorRatingID.ToString()) ? " " : Result.MentorRatingID.ToString();Thanks