Need some advice about file extension of the include file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I haven’t mastered the asp.net yet to be able to use asp.net 2.0 master
pages. So I am planning to create pages with .aspx extension and once I am
confident, I will rewrite them using master pages. The purpose of this
exercise is that I will be able to keep the filenames same.

All of these pages have a horizontal navigation menu. For the time being, I
am separating the simple html code of this horizontal menu into a separate
include file say topnav.txt. I read that include files should not be in
files that are not compiled ie. .txt as someone can simply enter in the path
in the browser and view your file!

Can someone suggest me what file extension (.txt, .aspx, .inc, etc) should I
give to this include file?

Joe
 
Include files shouldn't be in plain .txt if they contain sensitive
information...

Having said that, in ASP.Net there's a better alternative to <#!--INCLUDING
a file, use user controls. Unlike include files which aren't processed as
part of the ASP/ASP.Net processing cycle, user controls are part of the
ASP.Net cycle, meaning you can interact with them as richly as you would any
other object.

Check out
http://www.dotnetjunkies.com/quickstart/aspplus/doc/webpagelets.aspx for
more details.

Hope this helps,
Karl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top