c# - textbox or any control id keep on changing, why? -


for textbox, following id generated on local.

ctl00_contentplaceholder1_uclogin1_txtusername 

when hosted on iis, following id got generated.

contentplaceholder1_uclogin1_txtusername 

how can textbox id? don't reply answer use clientid, cos i'm using external javascript file. wont support clientid.

if you're using asp.net 4.0 can set clientidmode of textbox static , id same.

example:

<asp:textbox id="txtusername" runat="server" clientidmode="static" /> 

Comments

Popular posts from this blog

python - Why doesn't list have safe "get" method like dictionary? -

razor - Is this a bug in WebMatrix PageData? -

sql server - Stored procedure -