Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
- <script src="../../Scripts/jquery-1.2.6.js" type="text/javascript"></script>
- <script src="../../Scripts/MicrosoftAjax.debug.js" type="text/javascript"></script>
- <script src="../../Scripts/MicrosoftMvcAjax.debug.js" type="text/javascript"></script>
- <script type="text/javascript">
- var myView;
- $(pageLoad);
- function pageLoad() {
- myView = $create(Sys.UI.DataView, {}, {}, {}, $get("ajaxResult"));
- $("#callAjaxButton").click(callActionMethod);
- }
- function callActionMethod() {
- $.getJSON("/Home/GetCategories", bindData);
- }
- function bindData(data) {
- myView.set_data(data);
- }
- </script>
- <input type="button" id="callAjaxButton" value="ajaxCall" />
- <div id="ajaxResult"></div>
- </asp:Content>
- <script src="../../Scripts/jquery-1.2.6.js" type="text/javascript"></script>
- <script src="../../Scripts/MicrosoftAjax.debug.js" type="text/javascript"></script>
- <script src="../../Scripts/MicrosoftMvcAjax.debug.js" type="text/javascript"></script>
- <script src="../../Scripts/MicrosoftAjaxTemplates.debug.js" type="text/javascript"></script>
- <script type="text/javascript">
- var myView;
- Sys.Application.add_init(pageLoad);
- function pageLoad() {
- myView = $create(Sys.UI.DataView, {}, {}, {}, $get("ajaxResult"));
- $("#callAjaxButton").click(callActionMethod);
- }
- function callActionMethod() {
- $.getJSON("/Home/GetCategories", bindData);
- }
- function bindData(data) {
- myView.set_data(data);
- }
- </script>
- <input type="button" id="callAjaxButton" value="ajaxCall" />
- <div id="ajaxResult"></div>
Add Comment
Please, Sign In to add comment