& instead of &

I have gridview with the following code on row command

Dim row As GridViewRow = gvBusinessLines.Rows(e.CommandArgument)
txtBusinessLine.Text = CStr(row.Cells(1).Text)

'''''''''''''''''''''''''''''''''''''''''''''''

When I have this text in gridview for example:"test & test2", when clicking on the button of the gridview, textbox is containing test & test2

How to avoide this other than replace function?


Please remember to "Mark As Answer" if this post answered your question!

Bilal Shouman - MCAD.NET

|My Blog|
---------------------------------


0
JRICE
8/6/2007 11:13:19 AM
asp.net.getting-started 91979 articles. 3 followers. Follow

2 Replies
1111 Views

Similar Articles

[PageSpeed] 17

try HtmlEncode


Ravi |   Share Knowledge   |   Online messengers  
0
ravipahuja1
8/6/2007 11:54:41 AM

txtBusinessLine.Text =Server.HTMLDecode(CStr(row.Cells(1).Text))

 

Solved the problem

 


Please remember to "Mark As Answer" if this post answered your question!

Bilal Shouman - MCAD.NET

|My Blog|
---------------------------------


0
JRICE
8/8/2007 10:21:30 AM
Reply: