[OPEN] [#436] Property grid gives error if entered property value is decorated with < and > characters.

  1. #1

    [OPEN] [#436] Property grid gives error if entered property value is decorated with < and > characters.

    I have given the code below which fails if property value entered is decorated with < and > characters. For ex: Execute and try entering <abc> Or <xyz>

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Ext.Net.X.IsAjaxRequest) BuildSource();
    
        }
        private void BuildSource()
        {
            PropertyGrid1.Source.Add(new PropertyGridParameter()
            {
                Name = "NAME",
                Value = "ABCD"
            });
            PropertyGrid1.Source.Add(new PropertyGridParameter()
            {
                Name = "ADDRESS",
                Value = "Type value as <abc> and then click on save"
            });
        }
    
        protected void Save_Click(object sender, DirectEventArgs e)
        {
            Ext.Net.X.Msg.Alert("save", "clicked");
        }
    </script>
    
    <html>
    <head runat="server">
        <title></title>
    </head>
    <body>
        <ext:ResourceManager runat="server" ID="ResourceManager1" />
        <form id="form1" runat="server">
        <ext:PropertyGrid ID="PropertyGrid1" runat="server" SortableColumns="false" ForceFit="true"
            Layout="FitLayout">
            <Source>
            </Source>
            <Buttons>
                <ext:Button runat="server" ID="btnSave" Text="Save" Icon="Disk">
                    <DirectEvents>
                        <Click OnEvent="Save_Click">
                            <EventMask ShowMask="true" Msg="Saving ...">
                            </EventMask>
                        </Click>
                    </DirectEvents>
                </ext:Button>
            </Buttons>
        </ext:PropertyGrid>
        </form>
    </body>
    </html>
    Please let me know if you have any solution
    Last edited by Daniil; Feb 24, 2014 at 10:58 AM. Reason: [OPEN] [#436]
  2. #2
    Hello
    what version of EXT.NET are you using? I tried on the latest release of Ext.NET 2, in all major browsers and it works fine
    (and after adding .Show to the
     Ext.Net.X.Msg.Alert("save", "clicked").Show();,
    the msg box was displayed without problem

    Zdenek
  3. #3
    Hi everybody,

    I also cannot reproduce with the latest Ext.NET.

    It looks you didn't provide any info about the error.
  4. #4
    Thanks for the quick reply.

    I am using Ext.Net (2.4.0.30073) and Firefox. Please look at the scenario and error in image below.

    Click image for larger version. 

Name:	img1.png 
Views:	6 
Size:	22.7 KB 
ID:	7615
  5. #5
    You could switch off that validation.
    <%@ Page Language="C#" ValidateRequest="false" %>
  6. #6
    Thanks Daniil, it works perfect now. You can mark this thread as closed.
  7. #7
    We are thinking about an option to encode the data submitted to server. Created an Issue:
    https://github.com/extnet/Ext.NET/issues/436

Similar Threads

  1. Replies: 6
    Last Post: Jun 20, 2013, 1:25 PM
  2. Replies: 3
    Last Post: Dec 15, 2011, 12:18 PM
  3. Replies: 1
    Last Post: Feb 22, 2011, 11:25 PM
  4. [CLOSED] how to set panel html property as javascript property
    By kenanhancer in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Jan 05, 2011, 6:45 PM
  5. Replies: 3
    Last Post: Jun 28, 2010, 5:14 PM

Tags for this Thread

Posting Permissions