E
Elizabeth Harmon
Hi All
When .Net Creates User Controls on a Webpage, it appends a prefix seperated
by a Colon or an underscore then the Id of the server Control within that
User Control:
ex:
<aspropdownlist id="DDLList" runat="server"></aspropDownList> in design
mode
<aspropdownlist name="_ctrl0DLList" id="_ctrl0_DDLList"
runat="server"></aspropDownList> in run mode
I try to change the ID by setting the property of the DropDownList like
this:
DDLList.Id = "cmbDDLList"
But .Net retains the naming convention. Is there a way to get around this or
is this just what .Net Does?
if i use a placeholder and then Create the Object programmatically, i can
assign an ID and it keeps the name i assigned to the property.
I just thought after dragging and dropping there was a way on a user control
to retain the original Id i typed in for the Server control i droppped
there.
thanks in advance
When .Net Creates User Controls on a Webpage, it appends a prefix seperated
by a Colon or an underscore then the Id of the server Control within that
User Control:
ex:
<aspropdownlist id="DDLList" runat="server"></aspropDownList> in design
mode
<aspropdownlist name="_ctrl0DLList" id="_ctrl0_DDLList"
runat="server"></aspropDownList> in run mode
I try to change the ID by setting the property of the DropDownList like
this:
DDLList.Id = "cmbDDLList"
But .Net retains the naming convention. Is there a way to get around this or
is this just what .Net Does?
if i use a placeholder and then Create the Object programmatically, i can
assign an ID and it keeps the name i assigned to the property.
I just thought after dragging and dropping there was a way on a user control
to retain the original Id i typed in for the Server control i droppped
there.
thanks in advance