Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_components thread: .Write "

Message #1 by "Fotopoulos, Lefteris" <LFot@e...> on Wed, 29 Nov 2000 16:17:30 +0200
This message is in MIME format. Since your mail reader does not understand

this format, some or all of this message may not be legible.



------_=_NextPart_001_01C05A0F.1C5D2B50

Content-Type: text/plain;

	charset="windows-1253"



I would like to ask what is the best way to write HTML from within a

component in an asp page ?

 

thanks

 

----------------------------

Eleftherios C. Fotopoulos

Development

Eurocom Expertise SA

Mesogeion 372,

Ag. Paraskevi,

Athens, Greece

Tel.: +xxx xxxxxxx

Fax: +xxx xxxxxxx

http://www.eurocom.gr <http://www.eurocom.gr/> 

mailto:lfot@e... <mailto:lfot@e...> 

----------------------------





 




Message #2 by Robert Chartier <rchartierh@a...> on Wed, 29 Nov 2000 09:50:58 -0500
you could either send the content back to the ASP page, and let it handle

the output, or use the ASP objects (response) within the object itself and



send the content out.  Personally, I would most likely leave the output on



the ASP page, and only business rules, etc.. at the COM layer.  I guess

that will depend on the purpose, etc.. of the object.









At 09:17 AM 11/29/00, you wrote:

>I would like to ask what is the best way to write HTML from within a

>component in an asp page ?

>

>thanks

>

>----------------------------

>Eleftherios C. Fotopoulos

>Development

>Eurocom Expertise SA

>Mesogeion 372,

>Ag. Paraskevi,

>Athens, Greece

>Tel.: +xxx xxxxxxx

>Fax: +xxx xxxxxxx

><http://www.eurocom.gr/>http://www.eurocom.gr

>mailto:lfot@e...

>----------------------------

>

>

Robert Chartier

Author, AspFree.com

xxx-xxx-xxxx

rchartierh@a...

http://www.aspfree.com/devlinks

http://www.aspfree.com/authors/robert

http://www.aspalliance.com/nothingmn



Message #3 by "Jenz Ronnow" <jenz@c...> on Wed, 29 Nov 2000 16:00:42 +0100
This is a multi-part message in MIME format.



------=_NextPart_000_0004_01C05A1C.3C5F8150

Content-Type: text/plain;

	charset="windows-1253"

Content-Transfer-Encoding: 8bit



Exactly what are you meaning?

 

1.

You can use response.write("Some text") from an asp page or

<% = "Some Text" %> nestled in the asp HTML code.

 

Witch to use depends on the environment...

 

2.

You can create an asp page with the FileObject and write down the

asp page to the disc...

 

 

 

/Jenz Roennow

 

 



-----Original Message-----

From: Fotopoulos, Lefteris [mailto:LFot@e...]

Sent: den 29 november 2000 15:18

To: ASP components

Subject: [asp_components] .Write "<html ..." from component





I would like to ask what is the best way to write HTML from within a

component in an asp page ?

 

thanks

 

----------------------------

Eleftherios C. Fotopoulos

Development

Eurocom Expertise SA

Mesogeion 372,

Ag. Paraskevi,

Athens, Greece

Tel.: +xxx xxxxxxx

Fax: +xxx xxxxxxx

http://www.eurocom.gr

mailto:lfot@e...

----------------------------





 

---

.NET Runtime components or build your own ASP+

Decisions. Decisions!

Wrox Professional Web Developer Conference

29 November ? 1 December

http://www.wroxconferences.com/WebdevEurope?mid038




$subst('Email.Unsub')










Message #4 by ssteward@a... on Wed, 29 Nov 2000 08:53:13 -0600
This message is in MIME format. Since your mail reader does not understand

this format, some or all of this message may not be legible.



------_=_NextPart_001_01C05A14.1B6CEFC6

Content-Type: text/plain;

	charset="windows-1253"

Content-Transfer-Encoding: quoted-printable



Set a reference to "Microsoft Active Server Pages Library" (asp.dll) 

and put

the following function in your component:

=A0

Public Function OnStartPage(oSC As ASPTypeLibrary.ScriptingContext)

=A0 'This function is automatically called by IIS when

Server.CreateObject("Component.Class") is called.

=A0 Set oRequest =3D oSC.Request

=A0 Set oResponse =3D oSC.Response

=A0 Set oSession =3D oSC.Session

=A0 Set oServer =3D oSC.Server

End Function

=A0

From there you can reference all of the ASP objects from within your

component.=A0 So if you wanted to write HTML, do the following:

=A0

=A0=A0=A0 oResponse.Write "<HTML>" & vbcrlf

=A0

=A0

hope this helps...

=A0

Shawn



-----Original Message-----

From: Fotopoulos, Lefteris [mailto:LFot@e...]

Sent: Wednesday, November 29, 2000 8:18 AM

To: ASP components

Subject: [asp_components] .Write "<html ..." from component





I would like to ask what is the best way to write HTML from within a

component in an asp page ?

=A0

thanks

=A0

----------------------------

Eleftherios C. Fotopoulos

Development

Eurocom Expertise SA

Mesogeion 372,

Ag. Paraskevi,

Athens, Greece

Tel.: +xxx xxxxxxx

Fax: +xxx xxxxxxx

http://www.eurocom.gr <http://www.eurocom.gr/>

mailto:lfot@e... <mailto:lfot@e...>

----------------------------





=A0

---

.NET Runtime components or build your own ASP+

Decisions. Decisions!

Wrox Professional Web Developer Conference

29 November =96 1 December

http://www.wroxconferences.com/WebdevEurope?mid038



ssteward@a...


$subst('Email.Unsub')








Message #5 by Stephane_Dattenny@D... on Wed, 29 Nov 2000 09:00:39 -0600
This message is in MIME format. Since your mail reader does not understand

this format, some or all of this message may not be legible.



------_=_NextPart_001_01C05A18.2802C900

Content-Type: text/plain;

	charset="windows-1253"

Content-Transfer-Encoding: quoted-printable



I think it's not a good thing to send HTML strings from components.

Components could be use for Business Layer or DataAccess Layer

encapsulation.

ASP provide support for a Presentation layer (where HTML code should

resides).



If you really want to do so, just return a string containing your HTML 

code

from a method of your object and Response.Write the returned string.



Otherwise, I don't know if it could be a solution to pass the asp 

Response

object to the component and directly do a response.write from within 

the

method of the component.





Best regards / Cordialement<?xml:namespace prefix =3D o ns =3D

"urn:schemas-microsoft-com:office:office" />







Stephane Dattenny



Dell Computers - EMEA IT - VB and Web developer



Phone: +33 (0)4 99 75 49 88



  <file://C:\WINNT\Profiles\stephane_dattenny\Application

Data\Microsoft\Signatures\./Steph_files/image002.gif>







-----Original Message-----

From: Fotopoulos, Lefteris [mailto:LFot@e...]

Sent: 29 November 2000 15:18

To: ASP components

Subject: [asp_components] .Write "<html ..." from component





I would like to ask what is the best way to write HTML from within a

component in an asp page ?



thanks



----------------------------

Eleftherios C. Fotopoulos

Development

Eurocom Expertise SA

Mesogeion 372,

Ag. Paraskevi,

Athens, Greece

Tel.: +xxx xxxxxxx

Fax: +xxx xxxxxxx

http://www.eurocom.gr <http://www.eurocom.gr/>

mailto:lfot@e... <mailto:lfot@e...>

----------------------------







---

.NET Runtime components or build your own ASP+

Decisions. Decisions!

Wrox Professional Web Developer Conference

29 November =96 1 December

http://www.wroxconferences.com/WebdevEurope?mid038



stephane_dattenny@d...


$subst('Email.Unsub')








Message #6 by "Fotopoulos, Lefteris" <LFot@e...> on Thu, 30 Nov 2000 09:35:27 +0200
This message is in MIME format. Since your mail reader does not understand

this format, some or all of this message may not be legible.



------_=_NextPart_001_01C05AA0.1C07C610

Content-Type: text/plain;

	charset="windows-1253"

Content-Transfer-Encoding: quoted-printable



Thanks everyone who replied. However, Shawn gave the answer that i was

looking for.

Thanks again.



-----Original Message-----

From: ssteward@a... [mailto:ssteward@a...]

Sent: Wednesday, November 29, 2000 4:53 PM

To: ASP components

Subject: [asp_components] RE: .Write "<html ..." from component





Set a reference to "Microsoft Active Server Pages Library" (asp.dll) 

and put

the following function in your component:



Public Function OnStartPage(oSC As ASPTypeLibrary.ScriptingContext)

  'This function is automatically called by IIS when

Server.CreateObject("Component.Class") is called.

  Set oRequest =3D oSC.Request

  Set oResponse =3D oSC.Response

  Set oSession =3D oSC.Session

  Set oServer =3D oSC.Server

End Function



From there you can reference all of the ASP objects from within your

component.  So if you wanted to write HTML, do the following:



    oResponse.Write "<HTML>" & vbcrlf





hope this helps...



Shawn



-----Original Message-----

From: Fotopoulos, Lefteris [mailto:LFot@e...]

Sent: Wednesday, November 29, 2000 8:18 AM

To: ASP components

Subject: [asp_components] .Write "<html ..." from component





I would like to ask what is the best way to write HTML from within a

component in an asp page ?



thanks



----------------------------

Eleftherios C. Fotopoulos

Development

Eurocom Expertise SA

Mesogeion 372,

Ag. Paraskevi,

Athens, Greece

Tel.: +xxx xxxxxxx

Fax: +xxx xxxxxxx

http://www.eurocom.gr <http://www.eurocom.gr/>

mailto:lfot@e... <mailto:lfot@e...>

----------------------------







---

.NET Runtime components or build your own ASP+

Decisions. Decisions!

Wrox Professional Web Developer Conference

29 November =96 1 December

http://www.wroxconferences.com/WebdevEurope?mid038



ssteward@a...


$subst('Email.Unsub')





---

.NET Runtime components or build your own ASP+

Decisions. Decisions!

Wrox Professional Web Developer Conference

29 November =96 1 December

http://www.wroxconferences.com/WebdevEurope?mid038




$subst('Email.Unsub')









  Return to Index