NetTalk Central

Author Topic: ReplyContentType  (Read 2848 times)

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
ReplyContentType
« on: January 26, 2012, 04:17:55 AM »
Hi,

I have a page that can return either html, xml or plain text. The header can be set up to contain the reply content type in this way:

p_web.ReplyContentType = 'text/html'

for html, and similarly 'text/xml' for xml and 'text/plain' for plain text.

The page is a NetWebPage procedure that contains no controls. In the Processed Code embed I then set ReplyContentType to the required type and then setup the packet variable.

But it seems to have no effect. When the content is XML it doesn't display the text but View Source shows it all. Seems like content type is not properly set in this way.

Thanks

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: ReplyContentType
« Reply #1 on: January 26, 2012, 07:32:42 AM »
I'd do it like this;

a) NetWebPage Settings
Set "Page Type" to "Other"
Set content type to (say) loc:ContentType

b) Right-click and go to the source for the procedure.
create a variable loc:ContentType String(255)
search for where loc:ContentType is used
and set it to the correct value in the embed before that.

Cheers
Bruce

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Re: ReplyContentType
« Reply #2 on: January 26, 2012, 11:18:38 PM »
Thanks Bruce.