locked
Partial page load. RRS feed

  • Question

  • User2021533260 posted

    hi,

         I have to reload a specific part of page. It can be a div. I have created a list of links using literal control. by pressing the link in literal control, the div have to reload with the data specific to link. Instead of reloading the whole page, I have to load the div only. I can use jquery and ajax. please provide some links and code snippets.

    Thanks

    Monday, October 7, 2013 3:58 AM

Answers

  • User551462331 posted

    use client side templating... check jsrender

    http://www.bluelemoncode.com/post/2012/12/03/Revisiting-JsRender-and-more-Part-I.aspx

    if u simply want refresh the text part of page... not html layout them, u can simply use jquery ajax to get the updated text from server... like this

    $.ajax({
      url: 'pagename.aspx',
      type: 'GET',
      data: {},
      success: function(data) {
    	//called when successful
    	$('#div-id').html(data.d);
      }
    });

    hope this helps...

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 7, 2013 4:17 AM

All replies