Hi,
I pull some information from an Access database, the text is in French, so there is accents in the string. If I display the fields content in a datalist directly bound to an AccessDataSource all the strings are fine.
I am constructing a screen that I will use to update my news. When I select a news to edit from a listbox, I load the information in a gridView and populate the appropriate textboxes (only one record is return by the datasource). All the French characters are replace by coding. For example à become à Here is the code I use, I know there is probably a better way to do that, but I just start to learn ASP.Net...
Dim gvNews As New GridView
dbNewsEdit.DataBind()
gvNews.DataSource = dbNewsEdit
gvNews.DataBind()
txtDate.Text = gvNews.Rows(0).Cells(1).Text
txtTitle.Text = gvNews.Rows(0).Cells(2).Text
txtDesc.Text = gvNews.Rows(0).Cells(3).Text
If gvNews.Rows(0).Cells(4).Text = "0" Then
optNo.Checked = True
Else
optYes.Checked = True
End If
gvNews = Nothing
I notice that in debug mode, if I do a SHIFT-F9 on the gvNews.Rows(0).Cells(3).Text, the debugger gives me an option to see the result in TEXT, HTML or XML mode and in HTML all the characters are fine...
Thanks for your help.
Mal'chik![[bigglasses] [bigglasses] [bigglasses]](/data/assets/smilies/bigglasses.gif)
I pull some information from an Access database, the text is in French, so there is accents in the string. If I display the fields content in a datalist directly bound to an AccessDataSource all the strings are fine.
I am constructing a screen that I will use to update my news. When I select a news to edit from a listbox, I load the information in a gridView and populate the appropriate textboxes (only one record is return by the datasource). All the French characters are replace by coding. For example à become à Here is the code I use, I know there is probably a better way to do that, but I just start to learn ASP.Net...
Dim gvNews As New GridView
dbNewsEdit.DataBind()
gvNews.DataSource = dbNewsEdit
gvNews.DataBind()
txtDate.Text = gvNews.Rows(0).Cells(1).Text
txtTitle.Text = gvNews.Rows(0).Cells(2).Text
txtDesc.Text = gvNews.Rows(0).Cells(3).Text
If gvNews.Rows(0).Cells(4).Text = "0" Then
optNo.Checked = True
Else
optYes.Checked = True
End If
gvNews = Nothing
I notice that in debug mode, if I do a SHIFT-F9 on the gvNews.Rows(0).Cells(3).Text, the debugger gives me an option to see the result in TEXT, HTML or XML mode and in HTML all the characters are fine...
Thanks for your help.
Mal'chik
![[bigglasses] [bigglasses] [bigglasses]](/data/assets/smilies/bigglasses.gif)