ASP.NET 4.0 Dropdownlist以Chrome、Firefox编码的文本

ASP.NET 4.0 Dropdownlist以Chrome、Firefox编码的文本,asp.net,css,drop-down-menu,rendering,Asp.net,Css,Drop Down Menu,Rendering,我有一个asp.net网站,它是用Visual Studio Pro 2010开发的,后端是Windows Server 2008 R2和SQL Server 2008 R2,II7的框架是4.0 我的Dropdownlist仅在IE上运行良好,但在chrome和firefox上运行不好。这些项目显示的是奇怪的字符,我猜输出是编码的,所以我只是实现了一个代码来解决这个问题,但似乎我做错了什么。代码见下文 此外,我还尝试了旧式配置,以防引起问题,因此我决定在web.config文件中添加以下行 w

我有一个asp.net网站,它是用Visual Studio Pro 2010开发的,后端是Windows Server 2008 R2和SQL Server 2008 R2,II7的框架是4.0

我的Dropdownlist仅在IE上运行良好,但在chrome和firefox上运行不好。这些项目显示的是奇怪的字符,我猜输出是编码的,所以我只是实现了一个代码来解决这个问题,但似乎我做错了什么。代码见下文

此外,我还尝试了旧式配置,以防引起问题,因此我决定在web.config文件中添加以下行

web.config

<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>

这是一个css问题。在
/css/normalize.css
中找到此行,删除字体系列,然后从列表中选择

button,
input,
select,
textarea {
    font-family: inherit; /* 1 */ <--------- remove it
    font-size: 100%; /* 2 */
    margin: 0; /* 3 */
}
您将此
museOSANS500常规
字体名称放在下拉列表中,这是由于字体设计不当造成的


您可以更改字体系列,删除css行中的
select
,这取决于您,但这就是问题所在。

您可以显示呈现内容(对于此下拉列表),或者给我们一个实时url供检查吗?这是显示下拉列表的url:Aristos,请创建一个示例帐户,这对我来说真的很重要,过去两周我一直在努力解决这个问题,我很感激任何帮助。亚里士多德,这很有效!非常感谢您的时间和支持。我想我今晚会睡得很好:——)
protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
        {
            DisplayCategories();
        }  
}

private void DisplayCategories()
    {
        _objCategories.getJobCategories();
        JobCategoryList.DataSource =         _objCategories.JobCategoriesDS.Tables["GetJobCategories"];
        JobCategoryList.DataTextField = "CategoryName";
        JobCategoryList.DataValueField = "Id";
        JobCategoryList.DataBind();
    }

protected void SortHTML(object sender, EventArgs e)
    {
        foreach (ListItem item in ((DropDownList)sender).Items)
        {
            item.Text = Server.HtmlDecode(item.Text);
        }
    }
button,
input,
select,
textarea {
    font-family: inherit; /* 1 */ <--------- remove it
    font-size: 100%; /* 2 */
    margin: 0; /* 3 */
}
/* Form defaults */
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select { 
    border: 1px solid #ccc;
    padding: 6px 4px;
    outline: none;
    -moz-border-radius: 2px;
    -webkit-border-radius: 2px;
    border-radius: 2px;
    font-family: 'MuseoSans500Regular', Arial, sans-serif; <-------- remove it
    color: #777;
    margin: 0;
    width: 210px;
    max-width: 100%;
    display: block;
    background: #fff;
    -webkit-transition: all 0.2s ease-out;
    -moz-transition: all 0.2s ease-out;
    transition: all 0.2s ease-out;
    -webkit-box-sizing:border-box;
    -moz-box-sizing:border-box;
    box-sizing:border-box;
    }