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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:24:08+00:00 2026-06-18T01:24:08+00:00

Hii Guys!!!. I have a grid which is populating through jason data.Now I want

  • 0

Hii Guys!!!.
I have a grid which is populating through jason data.Now I want to retrieve the
jason values using jquery ajax call from server side code…

Below is my server side code…

getGriddahico.ashx

                        string json ="";
                        json = json + "{\n";
                        json = json + " \"page\":\""+intpage+"\",\n";
                        json = json + "\"total\":"+total_pages+",\n";
                        json = json + "\"records\":"+total+",\n";
                        json = json + "\"rows\": [";
                        rc = false;

                        while(rs.Read()){

                            if(rc){
                                json = json + ",";
                            }
                            json = json + "\n{";
                            json = json + "\"price\":\"" + Convert.ToInt32(rs["price"]) + "\",";
                            json = json + "\"cell\":[" + Convert.ToInt32(rs["price"]) + "";
                            json = json + ",\"" + Convert.ToString(rs["username"]) + "\"";
                            json = json + ",\"" + Convert.ToString(rs["ordinal"]) + "\"";
                            json = json + ",\"" + Convert.ToString(rs["toc"]) + "\"]";
                            json = json + "}";

                            rc=true;
                        }
                        json = json +"]\n";

                        json = json +"}";

and Here is my Jquery Ajax Call code.

 $(document).ready(function () {
        $.getJSON('getGriddahico.ashx', function (data) {
            //loop thru  json data
            //data will contain  json values < --
            $.each(data, function (key, val) {
                console.log(val);
            });
        });
    });

Plz guys Help me how to retrive the value from server side datareader to client side variable..
Thanx in advance.

  • 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-18T01:24:10+00:00Added an answer on June 18, 2026 at 1:24 am

    To me it looks as though you are returning a string value which you need to then parse in the JavaScript into a json object.

    Use the code $.parseJSON()

    $.getJSON('getGriddahico.ashx', function (data) {
    
        /* convert to json object */
        var json $.parseJSON(data);
    
        //loop thru  json data
        //data will contain  json values
        $.each(json, function (key, val) {
            console.log(val);
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hii Guys!!! i have a table named cdrcost which has dst column.I am need
Hii Guys!!! I have a table in which there is a column named Calldate
Hii Guys!!!, I have written a query in MySql which gives the sum of
hii I have a 680 buttons in a page, and I want to run
hii... I am making a view based application in which I have tabbar controller
hii i want to create a ui in which as i select a radio
hii, I am a fresher in c#,Now i am using dev express control.Now in
Hii Guys!!! I generated a simple parametrised jasper report for exporting data into pdf
Hi I want to keep some values through out the session for each record
Hii I have a requirement of calling the variable in function which is having

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.