sam1 0 Posting Whiz

Hi All,

I have a web browser control on my Form. I want to get the text lenght of an label element in web browser. what I have done so far is to get the element by id as follow

HtmlDocument htmlDocument = wbMain.Document;

            if (htmlDocument == null) return;

            HtmlElement txtsaveError = htmlDocument.GetElementById("errorDiv_ep");

now to check if this label contains error i am doing :

if (txtsaveError.OuterText.Trim().Length == 0)
{
}

But this doesnt work anyone knows of a good way of doing this please.

Thanks

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.