Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script src="jq/Base/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("button").click(function () {
                $('#result').load("files/Load.txt")
            });
        });
</script>


<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<button>Click to Load Data</button>

<div id="result"></div>
Posted
Updated 30-Nov-11 2:20am
v2
Comments
CPallini 30-Nov-11 8:23am    
The coder.

JavaScript
$(document).ready(function () {
            $("button").click(function (event) {
                $('#result').load("files/Load.txt", finish_load)
                event.preventDefault();
            });
 
Share this answer
 
v2
http://api.jquery.com/load/[^]

You need to provide a callback function to handle the return, that way you can debug issues. I've never tried with a txt file, I'm not sure if it will work.
 
Share this answer
 
v2
Comments
Christ_88 30-Nov-11 8:54am    
thanks , you helped me

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900