Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

so, i have a "index.aspx" page, in the article a read i so something like "drag and drop" the page.

 

what does it mean? let's say that page have my logo on the top, how do i make it to apear in the oter pages?

Posted

The easiest way to have pages "appear" in other pages is to use include files I find.

To do this, make a new page in .net and call it "yourpagename.inc" What you need to put in this page is just the code that contains the images and structure that you want in all pages.

using the .Inc extension makes it an include file. you can then call the include file.

 

For example, Imagine you have a very basic page called "index.aspx"

 

Here is the code

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="index1.aspx.vb" Inherits="inet1.index"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

<head>

<title>index</title>

 

</head>

<body MS_POSITIONING="GridLayout">

<form id="Form1" method="post" runat="server">

</form>

</body>

</html>

 

 

Then say you want to put a table in the body of the page, Make a new page with the <table> commands in it:

 

i.e

<table>

<tr>

<td>Hello World</td>

</tr>

</table>

 

and save this as "yourfilename.inc"

 

Then in your index.aspx code you need to include the file where you want the code to appear. you do this like this

 

<!--#INCLUDE FILE="yourfilename.inc"-->

 

Just insert that tag where you want it to appear!

 

Simple!

 

Andy

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...