Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Literal control rendering empty

2 views
Skip to first unread message

Paul

unread,
Jul 30, 2006, 3:56:54 AM7/30/06
to
Hi all,

I have a custom control with an overridden Render method. Inside this
method I'm rendering each control in its collection using their
RenderControl method. However, I'm running into a problem in this
scenario:

<myprefix:mycontrol runat="server">
<%= SomeVariable %>
</myprefix:mycontrol>

The contained control is showing up in the control collection as a
LiteralControl, but its Text property is empty. Well, it's a series of
spaces, so it's not showing up with any content. I can put <%=
SomeVariable %> anywhere outside my custom control and it will render
the variable value correctly.

Is there anything I can do to ensure the variable value is rendered?

I hope this post makes sense!

Thanks,

Paul

Paul

unread,
Jul 30, 2006, 8:47:19 PM7/30/06
to
Does anyone have any ideas?

Does anyone know the term for including server-side variables with the
<%= %> syntax, so I can have better luck searching for answers.

Thanks,

Paul

PeterKellner

unread,
Jul 30, 2006, 11:09:18 PM7/30/06
to
On 30 Jul 2006 17:47:19 -0700, "Paul" <paul....@gmail.com> wrote:

>Does anyone have any ideas?
>
>Does anyone know the term for including server-side variables with the
><%= %> syntax, so I can have better luck searching for answers.
>
>Thanks,
>
>Paul
>

databinding
Peter Kellner
http://peterkellner.net

0 new messages