J
Jim Heavey
I am trying to figure out what the difference is between these 2
commands and which I should be using...what the difference is...
I placed this tag on my form...
<div id="fred" runat="server"></div>
I wrote these 2 statements to find the control....
HtmlGenericControl cntrl = (HtmlGenericControl) Page.Controls
[1].FindControl(CntrlName);
HtmlGenericControl cntrl2 = (HtmlGenericControl) Page.FindControl
(CntrlName);
Both apparently work and populate cntrl and cntrl2 with something.
I know (or believe) the first one looks at a particular "instance" of
controls, but I would have no idea as to what to set the index to for
him to begin his search. Does not seem to care if I put 1 or 0 as far
as the indexer goes. Why would this be?
commands and which I should be using...what the difference is...
I placed this tag on my form...
<div id="fred" runat="server"></div>
I wrote these 2 statements to find the control....
HtmlGenericControl cntrl = (HtmlGenericControl) Page.Controls
[1].FindControl(CntrlName);
HtmlGenericControl cntrl2 = (HtmlGenericControl) Page.FindControl
(CntrlName);
Both apparently work and populate cntrl and cntrl2 with something.
I know (or believe) the first one looks at a particular "instance" of
controls, but I would have no idea as to what to set the index to for
him to begin his search. Does not seem to care if I put 1 or 0 as far
as the indexer goes. Why would this be?