Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3690730
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:04:05+00:00 2026-05-19T04:04:05+00:00

I’m using ajax in my website to call some information from a UserControl called

  • 0

I’m using ajax in my website to call some information from a UserControl called NewsFeed.ascx which is found in the folder ‘controls’, my way is to make a web service page (in a folder called WebMethods) which contain a function in my case called GetRSSReader which returns a string format:

    [WebMethod]
public string GetRSSReader()
{
    Page page = new Page();
    UserControl ctl =
      (UserControl)page.LoadControl("~/Controls/NewsFeed.ascx");

    page.Controls.Add(ctl);

    StringWriter writer = new StringWriter();
    HttpContext.Current.Server.Execute(page, writer, false);

    return writer.ToString();
}

then I call this page using Jquery (which I found it too heavy) to get the returned data as a JSON like this :

<div id="Content"></div>
<script type="text/javascript" defer="defer" src="../JAVA/Default.js"></script>

>

$(document).ready(Update);

function Requests()
{
  $.ajax({
    type: "POST",
    url: "../WebMethods/Feed.asmx/GetRSSReader",
    data: "{}",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: function(msg) {
      $('#Content').html(msg.d);
    }
  });
}

the Jquery.js and this page (default.js) founded in the folder Java

my question : is there anything better than this way . besides that when I have a huge amount of data it doesn’t work , and it doesn’t read the grid view tool . ANY Suggestions !? 10x

Form another side is there any alternatives for web-service !? (faster)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:04:06+00:00Added an answer on May 19, 2026 at 4:04 am

    While there are certainly lower-level ways to accomplish what you are doing that would reduce some overhead, it sounds like your problem is a “huge amount of data,” not the overhead of a WebService.

    Are you returning the entire contents of a news feed? Wouldn’t you rather just return what’s changed? Some logic would seem to be the answer…

    Also, there’s no real reason to use a webservice to do this. Just put the UserControl in a regular page (aspx) and call it with a GET query. You could also use a generic web handler (ashx) instead of a WebService which has lower overhead. But again it doesn’t sound like that’s really the issue here. Either way you don’t need to bother with JSON. You’re getting HTML, just get it, and use it directly.

    Also, instead of returning fully rendered HTML (without knowing what your UserControl does, it’s hard to know how to optimize this), just return the data, and use jQuery or something to produce the output. If you don’t want to build your template in jQuery, then you could render a default/empty template on the server, and use this on the client to build out with the data.

    This would be some work, of course, but if the amount of data is a bottleneck, it would help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
I'm making a simple page using Google Maps API 3. My first. One marker
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a bunch of posts stored in text files formatted in yaml/textile (from
I have some data like this: 1 2 3 4 5 9 2 6
In order to apply a triggered animation to all ToolTip s in my app,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.