|
Rank: Newbie Groups: Member
Joined: 6/26/2007 Posts: 2
|
Or better yet.. what is the best way to return a JSON string via the call back control so that I can consume it on the client side?
Thanks
-Raine
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi Raine, I am not aware of a way to remove <!--dummy-->. However if you only want to transfer data, you don't really need to care about that part. You can use this property to pass any data to the client side: http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.CallbackEventArgs.Data.html You will then get the data via the third paramter of your client side event handler: http://www.essentialobjects.com/ViewDoc.aspx?t=JSDoc.Public.Global.callback_after_execute_handler.htmlThe Data property has nothing to do with JSON though. It's a plain string up to you to use. Thanks
|
|
Rank: Newbie Groups: Member
Joined: 6/26/2007 Posts: 2
|
That will work, but still interesting there's not a way to remove that <!--dummy--> text :)
-Raine
|
|
Rank: Newbie Groups: Member
Joined: 1/4/2012 Posts: 2
|
Just upgraded to v9.0.37.2 and I’m also interested how to remove that <!--dummy--> text from output parameter, why it's there? version 3.1.8.2 did not have that feature.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
No. You can not remove that. That was added intentionally so that regardless you have any controls inside the CallbackPanel or not (or all controls inside the CallbackPanel are invisible), the CallbackPanel would still render valid HTML to the client.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 1/11/2012 Posts: 27
|
Hi - I'm not sure of whether the text you mentioned is a changeable property etc or whether this helps, but as a workaround you could always use this regex to split out all html comments like that one:
using System.Text.RegularExpressions;
...
inputHtml = Regex.Replace(inputHtml, @"<!--(.*?)-->", " ");
Cheers
|
|