$.get("CommentCount.aspx", function (data) {

                count = data;
                alert(count);
            });

this code will get data from CommentCount.aspx and i wrote it in html but when i run html nothing happen unless i open CommentCount.aspx first then html.How can i still get it when i only run html ?

Member Avatar for LastMitch

this code will get data from CommentCount.aspx and i wrote it in html but when i run html nothing happen unless i open CommentCount.aspx first then html.How can i still get it when i only run html ?

You read this (it has an example that you can used to fetch the **CommentCount.aspx **file):

http://dotnetslackers.com/articles/ajax/Using-jQuery-with-ASP-NET.aspx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.