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 88481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:34:00+00:00 2026-05-10T22:34:00+00:00

I am working on a project that I want to implement AJAX, and I

  • 0

I am working on a project that I want to implement AJAX, and I have decided on jQuery as a JavaScript Library. Here is the HTML:

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> <html xmlns='http://www.w3.org/1999/xhtml'> <head runat='server'>     <title>jQuery AJAX</title>     <!--<script language='javascript' type='text/javascript' src='inc/scripts.js'></script>-->     <script language='javascript' type='text/javascript' src='inc/jquery-1.2.6-intellisense.js'></script>     <script language='javascript' type='text/javascript'>         $(document).ready(function(){             $('#clicker').click(function () {                 $.ajax({                     type: 'POST',                     url: 'test.aspx/randomString',                     data: '{}',                     contentType: 'application/json; charset=utf-8',                     dataType: 'json',                     success: function(msg) {                         $('#result').append(msg.d);                     }                 });             });         });     </script> </head> <body runat='server'>     <form id='form1' runat='server'>         <div id='result' runat='server' style='margin-bottom:5em;'></div>         <div id='clicker' runat='server' style='cursor:pointer;'>Click Here to Refresh</div>     </form> </body> </html> 

And here is the back-end on test.aspx:

<WebMethod()> _ Public Shared Function randomString() As String     Dim KeyGen As RandomKeyGenerator     Dim NumKeys As Integer     Dim i_Keys As Integer     Dim RandomKey As String     Dim oRet As New StringBuilder     NumKeys = 20     KeyGen = New RandomKeyGenerator     KeyGen.KeyLetters = 'abcdefghijklmnopqrstuvwxyz'     KeyGen.KeyNumbers = '0123456789'     KeyGen.KeyChars = 12     For i_Keys = 1 To NumKeys         RandomKey = KeyGen.Generate()         oRet.AppendLine(String.Format('{0}{1}', RandomKey, ControlChars.NewLine))     Next     Return oRet.ToString End Function 

I have tried $('#result).text(msg.d) as well as forming a list, String.Format('<li>{0}</li>',RandomKey), and adding a break tag String.Format('{0}<br />',RandomKey).

When I run the page it returns as one line, all HTML is shown. What do I need to do to make it render the HTML?

I got the information on how to call a page without a ScriptManager from this site.

  • 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. 2026-05-10T22:34:01+00:00Added an answer on May 10, 2026 at 10:34 pm

    Use:

    $('#result').html(msg.d) 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey so I have been working on a project that I want to be
I have a working project that Im amending, it crashes after trying to use
I'm working on a project that requires to convert html email into text. Below
I am working on a project that requires that i implement a mechanism for
I'm working on a project that's trying to implement some editing features using a
I am working on a little project and want to implement some sort of
I'm working on a project that enables users post items they want to sell,
I am currently working on a project where I want to implement a bit
I have a template class that I am working on for a project that
I am working on a project that has over 40 ajax webservice calls. I

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.