Placing control tag text in a multiline TextBox
am 03.01.2008 03:02:21 von Nathan Sokalski
I have a multiline TextBox that I want to display the text used to create a
control in an apsx file. I want each of these to be on a separate line in
the TextBox. The only way I know of to place things on separate lines in a
TextBox without doing it programmatically is the following:
Line 1
Line 2
Line 3
However, if I do something like the following:
I receive a Parser Error that says:
Parser Error Message: The 'Text' property of 'asp:TextBox' does not allow
child objects.
Is there any way to avoid this problem without adding the text
programmatically? Thanks.
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/
Re: Placing control tag text in a multiline TextBox
am 03.01.2008 09:31:43 von Eliyahu Goldin
Try something like
<NJS:MyCustomControl ID="MyCtrl1" runat="server"/>
--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Nathan Sokalski" wrote in message
news:u6V3qyaTIHA.4360@TK2MSFTNGP06.phx.gbl...
>I have a multiline TextBox that I want to display the text used to create a
>control in an apsx file. I want each of these to be on a separate line in
>the TextBox. The only way I know of to place things on separate lines in a
>TextBox without doing it programmatically is the following:
>
>
> Line 1
> Line 2
> Line 3
>
>
> However, if I do something like the following:
>
>
>
>
>
>
>
> I receive a Parser Error that says:
>
> Parser Error Message: The 'Text' property of 'asp:TextBox' does not allow
> child objects.
>
> Is there any way to avoid this problem without adding the text
> programmatically? Thanks.
> --
> Nathan Sokalski
> njsokalski@hotmail.com
> http://www.nathansokalski.com/
>
Re: Placing control tag text in a multiline TextBox
am 03.01.2008 18:42:10 von Nathan Sokalski
That was not my real concern here, my problem was that I cannot and line
breaks. Because the text is being placed inside a TextBox, the br tag will
not work. For the moment, I am simply adding the text in the Init event of
the Page, but that requires me to make sure all the "'s are added correctly,
which is a pain to do. Any ideas?
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/
"Eliyahu Goldin" wrote in
message news:OoRDRNeTIHA.2000@TK2MSFTNGP05.phx.gbl...
> Try something like
> <NJS:MyCustomControl ID="MyCtrl1" runat="server"/>
>
> --
> Eliyahu Goldin,
> Software Developer
> Microsoft MVP [ASP.NET]
> http://msmvps.com/blogs/egoldin
> http://usableasp.net
>
>
> "Nathan Sokalski" wrote in message
> news:u6V3qyaTIHA.4360@TK2MSFTNGP06.phx.gbl...
>>I have a multiline TextBox that I want to display the text used to create
>>a control in an apsx file. I want each of these to be on a separate line
>>in the TextBox. The only way I know of to place things on separate lines
>>in a TextBox without doing it programmatically is the following:
>>
>>
>> Line 1
>> Line 2
>> Line 3
>>
>>
>> However, if I do something like the following:
>>
>>
>>
>>
>>
>>
>>
>> I receive a Parser Error that says:
>>
>> Parser Error Message: The 'Text' property of 'asp:TextBox' does not allow
>> child objects.
>>
>> Is there any way to avoid this problem without adding the text
>> programmatically? Thanks.
>> --
>> Nathan Sokalski
>> njsokalski@hotmail.com
>> http://www.nathansokalski.com/
>>
>
>