468,765 Members | 1,005 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

Why "Indentifier...out of scope"?

I get the following in my watch window on the strType var for the second to
last line:
strType error: identifier 'strType' out of scope

string strName;
string strId;
string strvalue;
string strType;

try
{

mshtml.HTMLDocument wd = (mshtml.HTMLDocument)this.IE_Inst.Document;
mshtml.IHTMLElementCollection wbrAll = wd.getElementsByTagName("input");

foreach (mshtml.IHTMLElement wbrElm in wbrAll)
{

strType = (string)wbrElm.tagName;
strName = wbrElm.getAttribute("name", 0).ToString();

strName does have a value. I was trying:
strType = (string)wbrElm.getAttribute("type", 0);

but that gave the same value. wbrElm.tagName has a value of "INPUT". Any
suggestions on what might be wrong?

Thanks,
Brett
Nov 17 '05 #1
0 1160

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by William | last post: by
3 posts views Thread by Luigi Donatello Asero | last post: by
8 posts views Thread by TTroy | last post: by
1 post views Thread by G Fernandes | last post: by
3 posts views Thread by marco_segurini | last post: by
3 posts views Thread by Tom Padilla | last post: by
39 posts views Thread by utab | last post: by
2 posts views Thread by dhtmlkitchen | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.