473,396 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

execute asp.net file in .html file

Hi,

We are moving from asp to asp.net.

In our existing model we execute the asp by including them in .html
files.
For example:
In abc.html file we include following directive:
<!--exec cgi="right_list.asp"-->

And the dynamic output comes on the .html page.

Please let us know what is the best possible solution in ASP.NET to
achive the same result.

Note:
We are aware of the asp.net user controls but that works only in .aspx
pages. I need to include/ execute the asp.net file in a .html file.

thanks & regards
Rajiv
Nov 18 '05 #1
7 1469
> Note:
We are aware of the asp.net user controls but that works only in .aspx
pages. I need to include/ execute the asp.net file in a .html file.


You don't do this in ASP.NET. ASP.NET is a completely different
architecture than ASP. If you want ASP.NET results, you need to get rid of
..html files and move to .aspx files.
Nov 18 '05 #2
Why in the world you would want to do this I don't understand. I would
highly recommend that you look at your website archetecture again.

None the less you could probiably acheive the same results by calling an
aspx page just the same.

abc.html
<!-- exec cgi="right_list.aspx" -->

If you're going to move from asp to asp.net then I would suggest that you
invest the extra amount of time to copy and paste the html from your old
pages into a new aspx page and add the dynamic contents as needed (either
though user controls or direct manipulation of <asp: controls). ASP.NET in
the way it was ment to be used will no doubt end up in less hastle overall.

Cheers!

David Kyle
www.chloemag.com
"Rajiv Gupta" <ra**********@gmail.com> wrote in message
news:e4**************************@posting.google.c om...
Hi,

We are moving from asp to asp.net.

In our existing model we execute the asp by including them in .html
files.
For example:
In abc.html file we include following directive:
<!--exec cgi="right_list.asp"-->

And the dynamic output comes on the .html page.

Please let us know what is the best possible solution in ASP.NET to
achive the same result.

Note:
We are aware of the asp.net user controls but that works only in .aspx
pages. I need to include/ execute the asp.net file in a .html file.

thanks & regards
Rajiv

Nov 18 '05 #3
I doubt you could get away with the same syntax, since by definition
processing an .aspx file returns a complete web page
(<HTML><HEAD><TITLE>....). So, would find that you would have complete
pages nested inside other complete pages.
"David Kyle" <dk***@chloemag.com> wrote in message
news:eT**************@TK2MSFTNGP09.phx.gbl...
Why in the world you would want to do this I don't understand. I would
highly recommend that you look at your website archetecture again.

None the less you could probiably acheive the same results by calling an
aspx page just the same.

abc.html
<!-- exec cgi="right_list.aspx" -->

If you're going to move from asp to asp.net then I would suggest that you
invest the extra amount of time to copy and paste the html from your old
pages into a new aspx page and add the dynamic contents as needed (either
though user controls or direct manipulation of <asp: controls). ASP.NET
in the way it was ment to be used will no doubt end up in less hastle
overall.

Cheers!

David Kyle
www.chloemag.com
"Rajiv Gupta" <ra**********@gmail.com> wrote in message
news:e4**************************@posting.google.c om...
Hi,

We are moving from asp to asp.net.

In our existing model we execute the asp by including them in .html
files.
For example:
In abc.html file we include following directive:
<!--exec cgi="right_list.asp"-->

And the dynamic output comes on the .html page.

Please let us know what is the best possible solution in ASP.NET to
achive the same result.

Note:
We are aware of the asp.net user controls but that works only in .aspx
pages. I need to include/ execute the asp.net file in a .html file.

thanks & regards
Rajiv


Nov 18 '05 #4
Use a User Control and place it at the top of the page.

Yes, folks, I know that's not the best way to do it...however, sometimes
when you're migrating, you can't do the entire thing at once.
"Rajiv Gupta" <ra**********@gmail.com> wrote in message
news:e4**************************@posting.google.c om...
Hi,

We are moving from asp to asp.net.

In our existing model we execute the asp by including them in .html
files.
For example:
In abc.html file we include following directive:
<!--exec cgi="right_list.asp"-->

And the dynamic output comes on the .html page.

Please let us know what is the best possible solution in ASP.NET to
achive the same result.

Note:
We are aware of the asp.net user controls but that works only in .aspx
pages. I need to include/ execute the asp.net file in a .html file.

thanks & regards
Rajiv

Nov 18 '05 #5
Actually, that is the best way to do it. But, the OP (for some reason)
wants to stay with .htm files.

"David Jessee" <dj*****@houston.rr.com> wrote in message
news:e0**************@TK2MSFTNGP15.phx.gbl...
Use a User Control and place it at the top of the page.

Yes, folks, I know that's not the best way to do it...however, sometimes
when you're migrating, you can't do the entire thing at once.
"Rajiv Gupta" <ra**********@gmail.com> wrote in message
news:e4**************************@posting.google.c om...
Hi,

We are moving from asp to asp.net.

In our existing model we execute the asp by including them in .html
files.
For example:
In abc.html file we include following directive:
<!--exec cgi="right_list.asp"-->

And the dynamic output comes on the .html page.

Please let us know what is the best possible solution in ASP.NET to
achive the same result.

Note:
We are aware of the asp.net user controls but that works only in .aspx
pages. I need to include/ execute the asp.net file in a .html file.

thanks & regards
Rajiv


Nov 18 '05 #6
Hi,

Thanks you all for the responses.

The reason we want to stick with .html files is that the client for
which we need to implement this is a website with massive indexing of
its pages on various search engines.
Also, we feel that .html files do have some benefit on indexing on
search engines over any other dynamic pages (.aspx for example).

Further as pointed out by "Scott M" processing .aspx file as "exec
cgi" will render complete html eg. from <HTML> to </HTML>. That would
produce erronous page output and an invalid html page.

So, from the discussion held so far i think i will have to stay back
with .asp file for this particular task.

But i strongly feel that we should have some provision in asp.net (may
be some new extension for scripting files) to achive this task
(atleast for existing web applications).

thanks & regards
Rajiv

"Scott M." <s-***@nospam.nospam> wrote in message news:<ui**************@TK2MSFTNGP10.phx.gbl>...
Actually, that is the best way to do it. But, the OP (for some reason)
wants to stay with .htm files.

"David Jessee" <dj*****@houston.rr.com> wrote in message
news:e0**************@TK2MSFTNGP15.phx.gbl...
Use a User Control and place it at the top of the page.

Yes, folks, I know that's not the best way to do it...however, sometimes
when you're migrating, you can't do the entire thing at once.
"Rajiv Gupta" <ra**********@gmail.com> wrote in message
news:e4**************************@posting.google.c om...
Hi,

We are moving from asp to asp.net.

In our existing model we execute the asp by including them in .html
files.
For example:
In abc.html file we include following directive:
<!--exec cgi="right_list.asp"-->

And the dynamic output comes on the .html page.

Please let us know what is the best possible solution in ASP.NET to
achive the same result.

Note:
We are aware of the asp.net user controls but that works only in .aspx
pages. I need to include/ execute the asp.net file in a .html file.

thanks & regards
Rajiv


Nov 18 '05 #7
> The reason we want to stick with .html files is that the client for
which we need to implement this is a website with massive indexing of
its pages on various search engines.

Also, we feel that .html files do have some benefit on indexing on
search engines over any other dynamic pages (.aspx for example).
Your pages will be re-indexed in a matter of weeks (sooner if you alert the
engies yourself). You could even have your .html files use the META tag to
forward a user to a new .aspx page. .html files have absolutley no extra
indexing benefits than .aspx pages do, as long as each page has appropriate
meta data using the <META> tag. There is just simply no reason to stay with
..html files.
But i strongly feel that we should have some provision in asp.net (may
be some new extension for scripting files) to achive this task
(atleast for existing web applications).


Why? ASP.NET takes nothing away and only adds to your capabilities. In my
opinion, you really haven't given a compelling reason to stay with static
files, but if you are going to stay with them, you can't blame a new
technology for not providing an interface to static files.
Nov 18 '05 #8

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

Similar topics

3
by: Jens | last post by:
This is a way too abvious newbie question but nevertheless a showstopper. I know how I can get a PHP script to execute by having a form with a post method in my regular HTML file. So far so good. ...
5
by: Phil Grimpo | last post by:
I have a very odd situation here. I have an administration page, where based on a users permissions, a recordset is called from the SQL server which has a list of paths to "Module Menus". Each of...
2
by: nick | last post by:
Hi, I wondering if it is possible in asp.net to somehow execute a string of code as if it were a page on the server. That is to say, if I executed the following code which resided in an aspx...
0
by: oliver | last post by:
QUESTION: How to access an object embedded in a UserControl through Javascript file? Another way to ask this question: How to execute script from a UserControl, accessing other objects in that...
2
by: Sike | last post by:
Hi everyone, I've been browsing this and a few other related newsgroups trying to get my head around this problem, and so far all the trails seem to go cold, without an acceptable solution being...
17
by: =?Utf-8?B?SmltIFJvZGdlcnM=?= | last post by:
I am trying to replace a huge chunck of code that currently I incorporate with an #Include directive. The program rarely has to flow through that code, so I thought it would be better if I used...
3
by: Go Live | last post by:
Whenever i try to accecc HTML page through server.execute, i got this error. Server object error 'ASP 0228 : 80004005' Server.Execute Error server.execute("/folder1/htmls/" & strfilename &...
0
by: David | last post by:
- Are there any peculiarities with using curs.executemany(...) vs. multiple How many times are you calling execute vs a single executemany? The python call overhead will add up for thousands of...
7
by: Service4PC | last post by:
Hi all, I've a problem... I'm writing an extension for php, and i need to execute a file php... but only the content of the file and not the file... Now I better explain: - the extension get the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.