I have been working on a web application that has a c# page that takes in some query parameters and generates the output as javascript.
For example: I have a page called http://mysite.com/test1.aspx. I use this page to process an xml file and pick up only the feed items specified in the query string and output javascript. The javascript just has html content with the following code below:
This basically puts the feeds on another site, and any third party site for all the browsers except Chrome, which fails to display the html content and gives me an error saying : Failed to load resource at the "http://mysite.com/test1.aspx?feeds=2&color=222222"
page. All the browsers work fine except for Chrome. This works fine with Safari which technically means it should also work in Chrome. But, I cannot seem to get around the problem and find a solution for this. Am I am following the incorrect approach, are
there any other alternatives solutions that I can use. Will it be useful if I use a web service and process the data as JSON? Could you if please let me know if I am doing something wrong with my current approach and if I can use a different approach.
smksu
Member
69 Points
34 Posts
Dynamic Javascript output from c#
Feb 22, 2012 07:25 PM|LINK
Hello All,
I have been working on a web application that has a c# page that takes in some query parameters and generates the output as javascript.
For example: I have a page called http://mysite.com/test1.aspx. I use this page to process an xml file and pick up only the feed items specified in the query string and output javascript. The javascript just has html content with the following code below:
The c# page does not create a javascript file, but it just outputs javascript when the page is processed.
I inculde this file in another site as below:
This basically puts the feeds on another site, and any third party site for all the browsers except Chrome, which fails to display the html content and gives me an error saying : Failed to load resource at the "http://mysite.com/test1.aspx?feeds=2&color=222222" page. All the browsers work fine except for Chrome. This works fine with Safari which technically means it should also work in Chrome. But, I cannot seem to get around the problem and find a solution for this. Am I am following the incorrect approach, are there any other alternatives solutions that I can use. Will it be useful if I use a web service and process the data as JSON? Could you if please let me know if I am doing something wrong with my current approach and if I can use a different approach.
Thank you for all your time.