jQuery and ASP.NET

April 30, 2009

Load pages in DIV using JQuery




If you have a <DIV> in your HTML or ASP.NET page and want to load another page in that DIV, then here's how to do so using one line of jQuery code


<html xmlns="http://www.w3.org/1999/xhtml">


<head runat="server">


    <title></title>


    <style type="text/css">


    .divPage


    {


        width:300px;


        height:200px;


    }


    </style>


 


    <script src="Scripts/jquery-1.3.2.js" type="text/javascript"></script>


    <script type="text/javascript">


        $(document).ready(function() {


        $('#LoadPage').load('Default.aspx');


        });    


    </script>


</head>


<body>


    <form id="form1" runat="server">


    <div>


    <div id="LoadPage" class="divPage">


    </div>


    </div>


    </form>


</body>


</html>



Bookmark this link on del.icio.us (saved by 0 users)

Did you like this post?
kick it on DotNetKicks.com
subscribe via rss subscribe via e-mail
print this post follow me on twitter
Others Also Read..

comments

3 Responses to "Load pages in DIV using JQuery"
  1. Jacob said...
    May 29, 2009 1:24 AM

    Is it possible to show a progress bar?

  2. viren said...
    October 5, 2009 12:41 PM

    Hi,
    This is very infomative site,boss you are doing great job..
    thanks
    thank you very much....
    god bless you brother.

  3. subhead said...
    June 14, 2010 2:20 AM

    thanks for that short tutorial. this helps me a lot.

 

Copyright 2010 All Rights Reserved DevCurry.com by Suprotim Agarwal