Quote:
quote:Originally posted by planoie
Yes and no. ;) The whole concept of #include has been abandoned. Because of the way .Net works, you now can access all your helper functions/classes/etc from anywhere in the namespace hierarchies. Of course, many people's use of include files was for layout. .Net's (poor IMHO) solution to this is user controls.
I just did a test in VS.Net. I created an ASPX file with no code-behind. It looked like this...
Code:
<%
Dim sTestString as String = "Junk test string"
Response.Write("This is coming from the include file.")
Response.Write(sTestString)
%>
Then I created an ASP file.
Code:
<%
Response.Write("This is coming from the include file.")
Response.Write(sTestString)
%>
I then added these lines to an existing aspx webform...
It worked!
So I guess the technically accurate answer is: Yes you can still do includes. And you seem to be able to mix them up between ASP and ASPX. But, you really shouldn't do this. Given that an include would need to be an asp/x file that has just inline script in it, you defeat the power and advantage of compilation, intellisense, etc.
What are you intending to do with includes?
|
I was planning on using includes for layout and I always created a links asp file and included it so I wouldn't have to change links on every page. (I hate frames)
So, can I create a links custom control?