Sunday, April 6, 2014

How to Avoid white space /   int textbox?

Actually what i'm doing is I'm displaying the Values in Gridview in Another web page.

when I take the value  from cells to textbox if the value is null or empty the  &nbsp  show in textbox
 lbl_GUID.Text = grdrow.Cells[1].Text;
            text_name.Text = grdrow.Cells[2].Text;
            text_age.Text = grdrow.Cells[3].Text;

solution :
when u r taking data from gridview cell this problem will coem pl. try like this:
 lbl_GUID.Text = grdrow.Cells[1].Text.Replace(" ","&nbsp ")

No comments:

MS in Computer Science with paid training in USA company