I am having a form in which some textbox are to be kept empty so when i update it then save it again it stores nbsp; value evry time i edit it.
plz give me the code in which i can prevent it entering nbsp;
Use Trim
string name = this.txtName.Text.Trim();
If space is there in Textbox Trim() will remove it.
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.