Welcome Guest Search | Active Topics | Sign In | Register

How do I remove <!--dummy--> from Callback Control Response? Options
Raine Lightner
Posted: Tuesday, June 26, 2007 10:50:59 AM
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
eo_support
Posted: Tuesday, June 26, 2007 10:58:33 AM
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.html

The Data property has nothing to do with JSON though. It's a plain string up to you to use.

Thanks
Raine Lightner
Posted: Tuesday, June 26, 2007 11:04:16 AM
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
jima
Posted: Friday, January 13, 2012 5:59:32 PM
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.
eo_support
Posted: Friday, January 13, 2012 10:24:40 PM
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!
glinkot
Posted: Tuesday, January 17, 2012 10:20:14 PM
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


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.