Literal Control question

M

Mark A. Sam

Hello,

I want to use a literal control to provide information about people listed
on a webpage, where the control is on the same line as the person it
addresses, so that I have a button, the person's name, and the literal
control on the same line. When the button is clicked it will populate or
cleat the literal control.

[+] John Smith []
[+] Mary Jones []
[-] Marv Johnson A Director. Came to the organization from Timbucktoo, Mo
in August 1005. Has been in full time ministy for 25 years..... et.
[+] Harry Oats []

The ending brackets represent the literal control.

My problem however is that I can't seen to get the text to move to the line
below that name. Is that becuase A literal control won't allow a carrage
return/line feed?

Here is the code I used on the button:
Protected Sub ShowRebecca_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles ShowRebecca.Click

If Literal1.Text = " " Then
Literal1.Text = vbNewLine + " This is a test of using a " +
vbNewLine + "literal control!"
ShowRebecca.Text = "-" 'Set button caption
Else
Literal1.Text = " "
ShowRebecca.Text = "+" 'Set button caption
End If

End Sub

Any help here would be appreciated. I can move the literal control to the
line below the name, but want to avoid spacing between the names.

God Bless,

Mark A. Sam
 
G

Guest

Hi Mark,

A Literal control should be populated with html code. So, instead of using a
vbnewline or vbcrlf, use an html line break tag (<br>).

Or, you could use a label control instead of the literal control. The label
control understands things like vbcrlf, I beleive.

Doug
 
M

Mark A. Sam

Hello Doug,

I tried a label with no better success, but the HTML worked. That looks
like it could be a powerful tool Thanks for the tip.

God Bless,

Mark

Doug Salomon said:
Hi Mark,

A Literal control should be populated with html code. So, instead of using
a
vbnewline or vbcrlf, use an html line break tag (<br>).

Or, you could use a label control instead of the literal control. The
label
control understands things like vbcrlf, I beleive.

Doug

Mark A. Sam said:
Hello,

I want to use a literal control to provide information about people
listed
on a webpage, where the control is on the same line as the person it
addresses, so that I have a button, the person's name, and the literal
control on the same line. When the button is clicked it will populate or
cleat the literal control.

[+] John Smith []
[+] Mary Jones []
[-] Marv Johnson A Director. Came to the organization from Timbucktoo, Mo
in August 1005. Has been in full time ministy for 25 years..... et.
[+] Harry Oats []

The ending brackets represent the literal control.

My problem however is that I can't seen to get the text to move to the
line
below that name. Is that becuase A literal control won't allow a carrage
return/line feed?

Here is the code I used on the button:
Protected Sub ShowRebecca_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles ShowRebecca.Click

If Literal1.Text = " " Then
Literal1.Text = vbNewLine + " This is a test of using a " +
vbNewLine + "literal control!"
ShowRebecca.Text = "-" 'Set button caption
Else
Literal1.Text = " "
ShowRebecca.Text = "+" 'Set button caption
End If

End Sub

Any help here would be appreciated. I can move the literal control to
the
line below the name, but want to avoid spacing between the names.

God Bless,

Mark A. Sam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top