Monday, April 16

How to display an ASPX in another ASPX's DIV using jquery

I am giving you Three Tested Solution which is working fine .You just copy code from below


SOURCE CODE!:-1





<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NewPageClick.aspx.cs" Inherits="NewPageClick" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script src="Js/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="Js/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
    <script language ="javascript" >
        function f1() {
            $("# shibashish ").load("TestMaster.aspx", {}, function () { });
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      <input type ="button" value ="get page" onclick ="f1()" /><br />
       Hi this is static
       <br />
       <div id="shibashish">
         hi this dynamic
       </div>
    </div>
    </form>
</body>
</html>



SOURCE CODE!:-2



<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
     <script src="Js/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="Js/jquery-1.7.1.min.js" type="text/javascript"></script>
   
    <script type="text/javascript">
        $(document).ready(function () {

            $("#Button1").click(function () {

                $.get('Default.aspx', function (data) {
                    $('#Shibashish').html(data);
                });
            });

           
        });
    </script>
</head>
<body>
    <input id="Button1" type="button" value="button" />
<div id="Shibashish">

</div>
</body>
</html>


SOURCE CODE!:-3




<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script src="Js/jquery-1.4.1.js" type="text/javascript"></script>
    <script language ="javascript" >
        $(document).ready(function () {

            $("# Shibashish ").load("Default.aspx", {}, function (data) {
                alert("loading complete");
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
       <div id="Shibashish">
       
       </div>
    </div>
    </form>
</body>
</html>

Thanks shibashish mohanty

1 comment:

  1. Thank you for your sharing!



    ----------------------------------------------
    Rc Helicopter|Rc Helicopters|Mini Rc Helicopter

    ReplyDelete

Please don't spam, spam comments is not allowed here.

ShibashishMnty
shibashish mohanty