title: Change only page page rendering on browser resize
body: <p>I have a ASP page which has a gridview. I have set the gridview height and width in javascript by using window.height and window.width. But when user resizes the browser the gridview size is not updated as it occurs only during page load. So how can I make gridview to set to page size when user resizes the browser window . I used below code As mentioned in <a href="https://stackoverflow.com/questions/5836779/how-can-i-refresh-the-screen-on-browser-resize">link</a> . But it reloads the page again and Page_load from code behind is run again and again data are retrieved from database etc. So is there any other methods without loading the page(Form_load) again?</p>
  
  <pre><code>jQuery(function($){
  var windowWidth = $(window).width();
  
  $(window).resize(function() {
   if(windowWidth != $(window).width()){
   location.reload();
   return;
   }
  });
  });
  </code></pre>