I am using Visual Studio 2008 developing a web app front-end for a T-SQL DB using asp.net and vb.net.

I have a label inside a list like so:

<ul id="ul" class="class">
            <li id="li">
                <asp:Label runat="server" ID="label"></asp:Label>
            </li>
        </ul>

I cannot access the label directly in my code-behind file like I normally would. (Ex. label.text = "Something")

I'm assuming I need to use FindControl in some way, but I'm obviously having no success.

I guess that means my question is: How can I expose the label control so I can manipulate it with vb?

Thank you,
J'Tok

Recommended Answers

All 2 Replies

in code, say the page_load event you could do:

me.label.text = "Test Text"

Thanks ninjaimp! Worked perfectly.

- J'Tok

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.