Hi all..
I have a textbox which contains value "rptl o & m".
I want select this row from gridview and display it on textbox.
But, the value that I get is "rptl o & m;m".
Please help me out with this & Sign.
Insert "&" sign and select it
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Nov 11, 2013, 1:26 AM EST
show us the code?
Riddhi ValechaRank #794 · 2.9K reputationPosted Nov 11, 2013, 2:30 AM EST
GridView Design - AutoGenerateSelectButton=True;
-------
Then, On SelectedIndexChanged Event of GridView, the following code is there -
GridViewRow row = gridview.SelectedRow;
int id = convert.toint(row.Cells[1].text)
-------
The query is - Select * from tablename where ID=id;
-----
I get the record from database in datatable.
-----------
I fetch the values as-
foreach(Datarow dr in datatable.Rows())
{
textbox1.text = dr["columnname"].ToString();
}
----
The value changes here at - "dr["columnname"].ToString();
"