473,657 Members | 2,579 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Embedding Classic ASP in ASP.NET page.

In the past in my company we have used the following to place the company
banner at the top of the page. In an attempt to be expedient and lazy, I
placed it immediate after the body tag in my template aspx jsut as we did in
classic ASP.
Two questions -- why didn't it work and what should I have done?

<body>
<script language="javas cript" type="text/javascript"
src="http://exchangeshared. ibastra.net/pages/ExchangeSharedT opNav.asp">
</script>
....stuff...

--
John Bankhead
Nov 19 '05 #1
3 1206
You should be using ASCX files to do this in ASP.NET. The are formally called
User Controls.

http://msdn.microsoft.com/library/de...ercontrols.asp

-Brock
DevelopMentor
http://staff.develop.com/ballen
In the past in my company we have used the following to place the
company
banner at the top of the page. In an attempt to be expedient and
lazy, I
placed it immediate after the body tag in my template aspx jsut as we
did in
classic ASP.
Two questions -- why didn't it work and what should I have done?
<body>
<script language="javas cript" type="text/javascript"
src="http://exchangeshared. ibastra.net/pages/ExchangeSharedT opNav.asp"

</script>
...stuff...


Nov 19 '05 #2
Hi John,
Two questions -- why didn't it work and what should I have done?
It didn't work because you don't program ASP.Net like ASP. They are 2
entirely different approaches to web application development.

What should you have done? Well, you have 2 choices:

1. Learn the ASP.Net programming paradigm.
2. Use ASP (expedient and lazy)

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"John Bankhead" <Jo**********@d iscussions.micr osoft.com> wrote in message
news:DC******** *************** ***********@mic rosoft.com... In the past in my company we have used the following to place the company
banner at the top of the page. In an attempt to be expedient and lazy, I
placed it immediate after the body tag in my template aspx jsut as we did
in
classic ASP.
Two questions -- why didn't it work and what should I have done?

<body>
<script language="javas cript" type="text/javascript"
src="http://exchangeshared. ibastra.net/pages/ExchangeSharedT opNav.asp">
</script>
...stuff...

--
John Bankhead

Nov 19 '05 #3
WJ

Mr Bankhead !

The lazy way is to Response.Redire ct("Lazy.asp",t rue);

The above instruction is the best xcommand to .xfer the control to someone
else, as long as it is web page :)

John BankRupt
Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3300
by: FC | last post by:
Hello folks, I was wondering if there any other method of achieving the following: I have a XSL transformation outputting a SVG document. For reasons too long to explain here, I must embed a CSS style sheet inside a <style> element in the SVG output document using a CDATA block. The CSS stylesheet is not an xml document, therefore I cannot open it using the document function (I suppose, I didn't even try frankly). In order to work...
5
4098
by: John | last post by:
I have a number of self-composed songs in mp3 format which are linked to their individual titles with <a href... The problem with this coding is that the songs open in a new window containing the media player transport control. I've tried embedding, but this is not suitable for multiple files. Ideally, I'd like visitors to have control over the playing of the songs with their media player embedded on the same page. I'm brainstorming here,...
3
5680
by: Tim T | last post by:
Hi, I hope there is someone reading this that has the answer, Please Help! I have the need to send a html email via asp.net. its easy enough to send an html email and add attachments. My question is, how to you set the Content-Location of each attachment in the mail headers so that the images are embedded in the html email rather than attached? This is my code:
5
1391
by: Joe Bonavita | last post by:
I need to change images with the click of a button but I don't want the entire page to refresh so I thought I should just use an embedded page. I'm trying to use the <object> tag for this but can't figure out how to change the page in the code behind. I tried a javascript like this: System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append("<script "); sb.Append("language='javascript'>");...
2
1680
by: OutlookNewbieDev | last post by:
Hello, I'm new to ASP.NET but have done quite a bit of classic ASP. I need to drill down to another page from the DataGrid using a record's ID. In classic ASP, this was quite easy but I can't find anything equivalent in ASP.NET. For example, I need to go from a page that lists Customers to a page for CustomerDetails by allowing the user to click anywhere on the row of the DataGrid.
3
13654
by: Ollie Riches | last post by:
How do I embed a *.flv file (Flash Video) into an aspx page similar to embedding windows media player active x control? Cheers Ollie Riches
4
5682
by: David Abrahams | last post by:
I'm seeing highly surprising (and different!) behaviors of PyImport_ImportModule on Linux and Windows when used in a program with python embedding. On Linux, when attempting to import a module xxx that's in the current directory, I get ImportError: No module named xxx I can work around the problem by setting
0
1172
polymorphic
by: polymorphic | last post by:
I have a client with a large pdf catalog. The client's web site is using classic asp. The catalog is taking too long to load for users so we had decided to load one pdf page at a time via a navigation bar and embedded pdf. Unfortunately, it does not appear that caching of a pdf is allowed when embedding the pdf in a classic asp page. Is there another alternative or something I am missing? What is the best way to manage a large .pdf? ...
4
3006
by: Ken Fine | last post by:
I'm making an administrative interface that lists records in a GridView. For *each* row in the gridview, I would there to be two interface elements in addition to some information associated with the record. Those interface elements are a Button and a TextBox. The idea is that the administrator using the interface will fill in an e-mail address and press the button if they want to send that particular record to someone by e-mail. (I know...
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8730
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1950
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1607
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.