I have already layed out my site in html, with the only table that changes in a different file. I was linking to this at the appropriate place using php before. I placed the script between <div> and </div> tags. When I changed my file type to asp so I could use other features, I also changed the script to load the other page. I just included this tag between the <div> and </div> tags instead:
The space where this previously worked when using php is now blank using this tag. Am I doing something wrong?
Also, I have seen some sites using asp have a layout where the address ends in something like: main.asp?id=1. How do I create this kind of layout? What do I need to save each new page as so it can be linked to in this way?
I use the include tag with my ASP pages and I don't encircle it with the div tag... perhaps getting rid of those might do the trick. Oh! And when you do that type of include, nothing shows up in the browser when you view the source, that's why it's a great place to hide authentication stuff!!
Also, the ASP layout you talk about are actually queries, where you open a page pulling up info from a record using the criteria that comes after the =? symbols. I use FrontPage to generate those queries.
I know that didn't answer all your questions, but I tried!!!!!
All of my pages so far are .asp and, as you can see in my first post, I am including a .asp file called default.asp. I was wondering if I need to use any further script (<% %>) in order to get this to work
had a look at your ASP page source code and actually seen the line:
This should not be the case. If i view the source it should just be HTML where the include file is. Now there are a number of reasons why this has happened. Maybe you have the following code:
This would not work.
An include file doesn't go within <% and %>. Remember you may have more ASP code in your include so you would have <% from your current page then followed my any <% and %> in your include, then you are doing %> back in your current page. This will not work.
Just try this:
'whatever asp code here
'the rest of your asp code
Failling that have you tried using virtual inc file?
<!--#include virtual ="default.asp"-->
If it still isn't working please post the code for the page.
I cannot understand why this isnt working as it is not any of the problems you just said. I dont even have any script in the entire page within <% %> tags. This is the bit of the script directly above and below the include file tag:
<td width=440 valign="top" rowspan=200>
<!--Start of main section-->
i just posted your code into an asp page and it works fine. This part of your code is correct. I am thinking there must be something else further up in your page that is cascading down and making this not work correctly. Without seen more of your code i couldn't really tell you what it is.
Maybe it is just an HTML problem, or it maybe an error in the include file itsself.
can you post the include file as well. The more i look at this the more i think it is an HTML problem.
I would however make the page an ASP page as you are loading into the page another ASP page. This would mean that you have an HTML page with an embeded ASP page. Just add this line to the top of your page you posted:
<%@ LANGUAGE="VBSCRIPT" %>
Try it again and see what happens, i doubt this will fix it but its a start.
The other thing i am worried about with your code is you have a <TABLE> tag then all your rows and columns extra then you have your include file then more table rows and columns then you close of your </TABLE> tag at the end. Now in Dreamweaver i am getting an HTML error on the first <TABLE> tag. I think this is the problem.
I dont know what you mean by making this page an asp page, it already is index.asp. You only have the .txt versions because, as I said, it has to be for me to attach it.
As for there being a html problem, I cant see how because it worked fine before I ever added any scripting. Well thats me confused then!
Anyway I just discovered from my hosting that they do not even support asp at the moment so unless I get new hosting I will not even be able to do this. I guess I could try php again unless you can give me a valid reason not to.
ok np, even allthough you have given your index page the extention .asp it is still not an ASP file until you add the following tag to the top of your index page:
<%@ LANGUAGE="VBSCRIPT" %>
The HTML code error, well Dreamweaver color codes your code for you, just helps the errors to stand out. Dreamweaver colors table tags green, but if there is an error with the tag then it would color it black. When i pasted your code into dreamweaver everything was ok apart from the first table tag which it colored black. This is where i think the error is and would advise you have a look at it.
Bummer about your host not supporting ASP, but stick with it once you find the error you will be fine.
I will definately try to fix this table problem you seem to have found, but I do not see how I can continue with asp for now at least. I dont want to be paying for more hosting and not even using one of my hosts, it is a waste of money (which I aint got). Technical support at my hosting said that this could be done easier and faster in php anyway. I will look into it.