PDA

View Full Version : [CLOSED] Illegal string was specified when DirectMethod rerendering a <style> section in an htmlbin with a Remark



michaeld
Jan 27, 2014, 5:41 AM
<HtmlBin>
<style type="text/css">
/*
.Test { padding:4px 0 4px 0; }
*/
.GTest2 { background-color:#DFE8F6; }
</style>
</HtmlBin>



Exception occurs in ResourceManager.registerCssClass because it does not know how to handle the remark.


Interestingly, while I was walking through the stack, I found that the eval was handling certain scenarios of javascript with line-breaks in the proper places. I've added notes to http://forums.ext.net/showthread.php?27710-OPEN-413-Remark-in-javascript-in-a-DirectEvent-Loaded-UserControl-causes-SyntaxError-missing-after-property-list

Daniil
Jan 27, 2014, 10:19 AM
Hi @michaeld,

Thank you for the report! We are investigating.

Here is a full test case.

Example

<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<script runat="server">
protected void ReRender(object sender, DirectEventArgs e)
{
this.Container1.ReRender();
}
</script>

<!DOCTYPE html>
<html>
<head runat="server">
<title>Ext.NET v2 Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />

<ext:Container ID="Container1" runat="server">
<HtmlBin>
<style type="text/css">
/*
.Test { padding:4px 0 4px 0; }
*/
.GTest2 { background-color:#DFE8F6; }
</style>
</HtmlBin>
</ext:Container>
<ext:Button runat="server" Text="ReRender" OnDirectClick="ReRender" />
</form>
</body>
</html>

Vladimir
Jan 29, 2014, 7:42 PM
Fixed in SVN