Simple question - Make Label1 = Bound Field in ItemTemplate of Formview

P

Phillip Vong

I'm a newbie. Using VS2005 making a simple ASPX page for testing and
learning.
I have a simple SQL connection.

I created a Formview and I am in EditItem Template. I added a label
(LABEL1) to the outside of the ItemTemplate and I have a button inside the
template. I want my Label1 to = my bound item (LastNameLable) inside the
template when I click the button. The code I thought would work is below,
but I'm getting Label1 with a text "FALSE" when I click the button.

Thanks!
Phil



Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs)

Dim nghia As String

nghia = FormView1.TemplateControl.ID.Contains("LastNameLabel")

Label1.Text = nghia


End Sub
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top