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

  • Home
  • SEARCH
  • 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 8624325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:30:04+00:00 2026-06-12T07:30:04+00:00

I am retruning a string from the webmethod that is a table. The success

  • 0

I am retruning a string from the webmethod that is a table. The success method on the $.ajax is hit but does not insert the retruned result into the specified element.

 success: function(result){
          $('#divSubjectQuestions').html(result);
  },

when I insert some string of html then it is rendered but this code is not working.

Edit:

   int SubjectId = Convert.ToInt32(sSubjectId);
    DataTable QuestionsTable = QuestionDataAccess.RetrieveSubjectQuestion(SubjectId);

    string head = "<table class='gridstyle' cellspacing='0' rules='all' border='1'  style='border-collapse:collapse;width: 100%;'><tr class='headerclass'><th scope='col'>Subject l Questions</th></tr>";
    string body = "";
    foreach (DataRow row in QuestionsTable.Rows)
    {
        body += " <tr><td> <a  href='QuestionDisplay.aspx?Id=" + row.ItemArray.GetValue(1) + "'style='font-size:Small;text-decoration:none;'>" + row.ItemArray.GetValue(0) + "</a><br /><span  style='font-size:XX-Small;'>" + row.ItemArray.GetValue(2) + "</span>&nbsp;<span  style='color:Gray;font-size:XX-Small;'>Boosts" + row.ItemArray.GetValue(5) + "</span>&nbsp;<span  style='font-size:XX-Small;'>" + row.ItemArray.GetValue(4) + "</span>&nbsp;<span  style='font-size:XX-Small;'>" + row.ItemArray.GetValue(3) + "</span>&nbsp;<span  style='font-size:XX-Small;'>" + row.ItemArray.GetValue(6) + "</span></td></tr>";
    }
   // return head + body + "</table>";
    return "<p>boom!</b>";
  • 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-06-12T07:30:05+00:00Added an answer on June 12, 2026 at 7:30 am

    Actually I was returning json data so checking the result with console.log(result). I found the json object which had attached the result to “d” variable.
    Then accessing result.d solved the problem.

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

Sidebar

Related Questions

I have an AJAX script that receives a string from a mySQL query returned
I want to make a Keywords table that stores words in a string (from
How do I go about picking a random string from my array but not
r'\' in Python does not work as expected. Instead of returning a string with
I have to retreive a string from database using their id.I done thet retreival,But
i'm trying to update a listbox using ajax/jquery/webmethod. from inspecting network activity in developer
I am returning a string of either T or F from an NSDictionary key
I'm returning data from a HttpGet and then passing the string(s) into a Listview
I understand that <%= is for returning a String I seem to usually use
A search API is returning date in String format,I want to compare that date

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.