PDA

View Full Version : [CLOSED] String value interpreted as ID



moldeveloper
Mar 13, 2017, 10:37 AM
Hi,
the following page produces an error, as the chars "${...}" inside the string are interpreted as an ID:


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="Extranet.Test" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<ext:ResourceManager runat="server" />
<form id="form1" runat="server">
<ext:ComboBox ID="comboTest" runat="server" />
</form>
</body>
</html>



using System;
using System.Linq;

namespace Extranet
{
public partial class Test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
comboTest.Items.Add(new Ext.Net.ListItem("broken ${aaa}", "1"));
}
}
}


the resulting javascript is


Ext.onReady(function(){Ext.create("Ext.form.field.ComboBox",{id:"comboTest",renderTo:"App.comboTest_Container",queryMode:"local",store:[["1","broken Ext.select("aaa")"]]});});

I have no control on strings displayed (in general they are data coming from different sources, and I can't filter every string). The problem has a big impact, as the entire page is broken ad not rendered.

fabricio.murta
Mar 13, 2017, 8:53 PM
Hello @moldeveloper!

That's actually a feature of Ext.NET. You can disable it if you want. Please refer to this forum thread that already discussed this:

${org substring is expanded to Ext.select("org... in MVC app (http://forums.ext.net/showthread.php?53141).

I hope this helps!

fabricio.murta
Mar 24, 2017, 3:46 PM
Hello again, @moldeveloper!

It's been some time since we replied you, and still no feedback from you. Do you still need help with this issue?

We may be marking this thread as closed if you don't post a follow-up in 7+ days from now, but that won't prevent you from posting again when you feel like.