Response.Write
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngfreeforall' list.


AWayland@t-online.de (Wayland)
-- Moved from [aspstatemanagement] to [aspngfreeforall] by Victor Von Doom <Click here to reveal e-mail address> --

Hi,

I have got a normal aspx page with codebehind. How Can I Response.Write
a Variable from the Codebehind (c#) into this situation.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflas
h.cab#version=6,0,29,0" width="100%" height="170" accesskey="800"
tabindex="a" title="HotelFlash">
<param name="movie"
value="hotelslide_all_move.swf?Session_ID=<%=Response.Write("Session_ID"
)%>">
<param name="quality" value="high">

Thanks

Adam

Reply to this message...
 
    
James Yang
<%=SesionID%>
IS
<% Response.Write (SessionID)%>

----- Original Message -----
From: "Wayland" <Click here to reveal e-mail address>
To: "aspngfreeforall" <Click here to reveal e-mail address>
Sent: Saturday, August 17, 2002 5:16 PM
Subject: [aspngfreeforall] Response.Write

> -- Moved from [aspstatemanagement] to [aspngfreeforall] by Victor Von Doom
<Click here to reveal e-mail address> --
[Original message clipped]

Reply to this message...
 
    
Steve Mark
You can also place a Literal control on your page and set it from the
codebehind page. This way you maintain encapsulation of the codebehind
class information (i.e. the data is "pushed" to the .aspx from the
.aspx.cs instead of the .aspx page "pulling" it from the .aspx.cs.

Also, we've found that it is almost never necessary to use <% %> on the
.aspx page except for the page header of course. There's always another
way that works better with codebehind.

Steve

[Original message clipped]

Reply to this message...
 
    
AWayland@t-online.de (Wayland)

Hi Steve,

I'm only at the start of ASP.NET. So what Literal Control should I use.
All the Controls I kwon add some kind of HTML with the Variable. I want
to insert o values at different places but without HTML. And the second
thing is why is it better to keep the code behind in encapsulation
(performance or...??).
I would really appreciate it if you could explain it to me. Thanks

Adam

-----Original Message-----
From: Steve Mark [mailto:Click here to reveal e-mail address]
Sent: Samstag, 17. August 2002 17:00
To: aspngfreeforall
Subject: [aspngfreeforall] Re: Response.Write

You can also place a Literal control on your page and set it from the
codebehind page. This way you maintain encapsulation of the codebehind
class information (i.e. the data is "pushed" to the .aspx from the
.aspx.cs instead of the .aspx page "pulling" it from the .aspx.cs.

Also, we've found that it is almost never necessary to use <% %> on the
.aspx page except for the page header of course. There's always another
way that works better with codebehind.

Steve

[Original message clipped]

| ASP.net DOCS = http://www.aspng.com/docs
| [aspngfreeforall] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/aspngfreeforall = JOIN/QUIT
| news://ls.asplists.com = NEWSGROUP

Reply to this message...
 
    
Alex Lowe
Adam,

There is actually a control called a 'Literal' control (and it does not
emit any HTML) and can be found in the System.Web.UI.WebControls.Literal
class
(http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemWebUIWebC
ontrolsLiteralClassTopic.asp). Check out the docs (watch out the URL may
have wrapped).

Hth,

Alex - AspFriends.com Moderation Team
Microsoft MVP - ASP.NET

***********************************************************
Translate C# code to VB.NET code at
http://aspalliance.com/aldotnet/examples/translate.aspx
***********************************************************

[Original message clipped]

Reply to this message...
 
    
Steve Mark
Adam,

I'd suggest picking up a book like "Professional ASP.NET"
(http://www.amazon.com/exec/obidos/tg/detail/-/1861007035/onthemarksysti
nc) and reading the first few chapters.

Basically though using codebehind allows you to separate your page
functional logic from your presentation code.

Steve

[Original message clipped]

Reply to this message...
 
 
System.Web.UI.WebControls.Literal




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com