0

hello all,
i am using asp.net and while designing my page i want to call another aspx page in my current page.....i.e. in my current page (ex. p1.aspx) ,i want to add a header let it be header.aspx. how can i call that header page in p1.aspx????

actually i want to do some dynamic stuff in that header page so instead of using HTML i am going for aspx....i have used the command <!-- #include virtual ="header.aspx" -->...but i am getting the error as "there can be one page directive "...

plz help me how to call an aspx from another aspx page?

thanx in advance.......
:)

6
Contributors
5
Replies
7
Views
8 Years
Discussion Span
Last Post by Fortinbra
0

It depends on what kind of a functionality you require in the second aspx (the one you are calling).

If you are just trying to create a dynamic header, you can try looking at user controls.

If you still want to pursue with a complete embedded page, you can use Iframes for the purpose.

0

In PHP we using include() we include any php page , method is given below

<?php
include("path/pagename.php");
?>

as this type we can insert one page in another page

0

Try using asp.net master pages to achieve your effect.But all the same clientside technologies are best for effects, browser has the final word anyway.

0

Using a master page will allow you to define the overall structure for the pages, and set a default header for all pages, that you can then change on a page to page basis, if you so choose.

I'm trying my best to stay to the strict versions of the HTML and XHTML standards, and last I looked, iFrames aren't approved anymore.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.