<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> $(function () { $("#<%= Button1.ClientID %>").bind("click", fromServer) }); function fromServer() { $.ajax({ type: "GET", url: "textFromServer.txt", success: postToPage }); } function postToPage(data, status){ $('#servertext').text(data); } </script> <asp:Button ID="Button1" runat="server" Text="Get Text" /><br /> <div id="servertext"></div>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)