Search This Blog

Thursday, April 25, 2013

How can use Replace function in c#


 txtques.Text = dr[0].ToString().Replace("'","'").Trim();
 txtans1.Text = dr[1].ToString().Replace("'","'").Trim();
 txtans2.Text = dr[2].ToString().Replace("'","'").Trim();
 txtans3.Text = dr[3].ToString().Replace("'","'").Trim();
 txtans4.Text = dr[4].ToString().Replace("'","'").Trim();
             
cant show like this can't

insert case
string txt_book1 = txt_book.Text.ToString().Replace("'", "'").Trim();

update case
string txt_book1 = txt_book.Text.ToString().Replace("'", "'").Trim();

No comments :