0

I'm building an ASP.NET app, but there ASP includes in the dreamweaver template that includes other asp pages.

I'm getting this error:

BC30289: Statement cannot appear within a method body. End of method assumed.

Line 10:
Line 11:
Line 12: sub navTabs()
Line 13: response.write("<img src='/images/" + img + "' hspace='0' border='0' usemap='#navTabs' />")
Line 14: end sub

I brought all of the code directly into the template, but it has changed anything. Any suggestions?

3
Contributors
7
Replies
8
Views
11 Years
Discussion Span
Last Post by Letscode
0

You can't mix ASP and ASP.NET.

Well, I have been given some logos with ASP to be included in any pages I create. I put all the logos in a dreamweaver template which references .asp pages that reference .asp pages.

What are my options to fixing the problem?

Thanks,

Sam

0

Can you "include" in ASP.NET like in ASP? If so, is it the exact same way? If it's not the same way, can you throw me an example?

Thanks,
Sam

0

ASP.NET is completely different. For every HTML element, ASP.NET has a "server control" that emits that HTML. So you can't have an ASP.NET server control that would emit "ASP" code for further processing via an ISAPI.DLL.

Sorry, but you just can't mix the two.

0

Well, what I mean is, if I re-write the asp into ASP.NET, but kept the structure the same ("include" or whatever the .NET equivalent is), will it work?

What is the .NET equivalent?

Thanks,
Sam

0

You can dymanically load images with ASP.NET. I'm not sure why you'd need an "include", by which I guess you mean an SSI (server-side-include). Your ASP.NET WebForm code-behind file will use standard programming to render image controls.

Or, you can encode all your image selection logic in a separate WebForm, and set the src attributes of your img element to that WebForm.

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.