Last post Aug 08, 2019 05:32 AM by samwu
Member
423 Points
970 Posts
Aug 07, 2019 09:31 PM|mariolopes|LINK
Hi
I have one gridview with this code:
<asp:GridView ID="GridView1" CssClass="table table-hover " GridLines="None" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" OnRowCommand="GridView1_RowCommand"> <Columns> <asp:TemplateField HeaderText="Apagar"> <ItemTemplate> <asp:ImageButton ID="ImageButton1" CommandName="apagar" CommandArgument='<%#Eval("id")+";"+Eval("nome") %>' runat="server" ImageUrl="~/imagens/delete.png" /> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" SortExpression="id" ItemStyle-CssClass="hiddencol" HeaderStyle-CssClass="hiddencol" /> <asp:BoundField DataField="nome" HeaderText="nome" SortExpression="nome" /> <asp:TemplateField HeaderText="Alterar"> <ItemTemplate> <asp:ImageButton ID="ImageButton2" CommandName="editar" CommandArgument='<%#Eval("id")+";"+Eval("nome") %>' runat="server" ImageUrl="~/imagens/edit.png" /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView>
The field nome show chars like that in the grid
but in mysql file all is ok
It seems the website does not support portuguese chars. How to solve this issue?
My sql command
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="select * from entidades where id<>5"></asp:SqlDataSource>
Thank you
Contributor
3370 Points
1409 Posts
Aug 08, 2019 05:32 AM|samwu|LINK
Hi mariolopes,
Please check if your operating system, browser application and website support displaying Portuguese language.
I tested it on my chrome, Firefox, IE and Edge. They all display normally.
what is the type of encoding or character set you are using for the application?
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Unable to display language problems properly.aspx.cs" Inherits="case_solution.Rendering_issues.Unable_to_display_language_problems_properly" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"> <Columns> <asp:BoundField DataField="nome" HeaderText="nome" SortExpression="nome" /> </Columns> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CaseTestConnectionString %>" SelectCommand="SELECT [nome] FROM [Test33]"></asp:SqlDataSource> </div> </form> </body> </html>
Here is an article about how to set the display characters in chrome for your reference. https://itstillworks.com/display-japanese-characters-google-chrome-14542.html
If you haven't solved the problem, please post you aspx code.
Best regards, Sam
Member
423 Points
970 Posts
GridView with bad chars
Aug 07, 2019 09:31 PM|mariolopes|LINK
Hi
I have one gridview with this code:
The field nome show chars like that in the grid
but in mysql file all is ok
It seems the website does not support portuguese chars. How to solve this issue?
My sql command
Thank you
https://programamos.pt
Contributor
3370 Points
1409 Posts
Re: GridView with bad chars
Aug 08, 2019 05:32 AM|samwu|LINK
Hi mariolopes,
Please check if your operating system, browser application and website support displaying Portuguese language.
I tested it on my chrome, Firefox, IE and Edge. They all display normally.
what is the type of encoding or character set you are using for the application?
Here is an article about how to set the display characters in chrome for your reference. https://itstillworks.com/display-japanese-characters-google-chrome-14542.html
If you haven't solved the problem, please post you aspx code.
Best regards,
Sam