Nov 02, 2011, 7:57 AM
[CLOSED] SelectBox: Problem with characters "<" and ">"
Hi,
I am having some issue with characters "<" and ">" in the SelectBox.
If I use "<abc><def>", it will not be displayed in the List, but it will be displayed in the SelectBox properly.
If I use "<ghi>", it will be correctly displayed in the List as "<ghi>" but it will be incorrectly displayed in the SelectBox as "<ghi>".
Can you advice how I can show values that contain "<" and ">" for both the SelectBox and the List?
Complete HTML:
I am having some issue with characters "<" and ">" in the SelectBox.
If I use "<abc><def>", it will not be displayed in the List, but it will be displayed in the SelectBox properly.
If I use "<ghi>", it will be correctly displayed in the List as "<ghi>" but it will be incorrectly displayed in the SelectBox as "<ghi>".
Can you advice how I can show values that contain "<" and ">" for both the SelectBox and the List?
Complete HTML:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="WebApplication.ExtNet.Trending.Test" ValidateRequest="false" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<html>
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager_Trending" runat="server" IDMode="Explicit" />
<ext:SelectBox ID="SelectBox1" runat="server" ValueField="Code" DisplayField="Description" Width="120">
<Store>
<ext:Store ID="storeSelectBox1" runat="server">
<Reader>
<ext:ArrayReader>
<Fields>
<ext:RecordField Name="Code" />
<ext:RecordField Name="Description" />
</Fields>
</ext:ArrayReader>
</Reader>
</ext:Store>
</Store>
</ext:SelectBox>
</form>
</body>
</html>
Complete Server-Side Codes:using System;
using Ext.Net;
namespace WebApplication.ExtNet.Trending
{
public partial class Test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
object[] datasource = new object[3];
datasource[0] = new object[] { 1, "Value 1" };
datasource[1] = new object[] { 2, "<abc><def>" };
datasource[2] = new object[] { 3, "<ghi>" };
var store = this.SelectBox1.GetStore();
store.DataSource = datasource;
store.DataBind();
}
}
}
Last edited by Daniil; Nov 03, 2011 at 6:50 AM.
Reason: [CLOSED]