ASP.NET 2.5 prefixing ctl00 and ASP.NET 4 not prefixing ctl00

后端 未结 4 418
后悔当初
后悔当初 2020-11-30 11:23

Does anyone know why ASP.NET 4 has dropped the ctl00 prefix on ASP controls?

Is there a setting I have missed?

4条回答
  •  -上瘾入骨i
    2020-11-30 11:41

    If you just want to add 'ct100' prefix to your control's IDs, add Master page to your WebPage. But how said above, try to avoid using hardcode with controls ids in your sources and read Metthew's comments for generation custom ID

提交回复
热议问题