views:

33

answers:

2

Hi All I am having this problem. Locally everything is working fine. Once I upload the published version on production the IDs of all elements will have a different prefix.

I know that the prefix is caused by using master pages, but why it is different from local to production?

See Image

alt text

+1  A: 

This happens. The lesson to be learned is don't rely on "hardcoded" client-side control ids. That's why asp.net gives you the Control.ClientID property. Use it in place of your hard-coded value.

matt-dot-net
A: 

I agree with Matt-dot-net, dont use hardcoded client-side control ids.

However, check your dev/production web.configs for xhtmlConformance mode="Legacy" (or something similar), if only one of your configs has this set then it may account for you having different ids on dev and production .

Cheers Tigger

Tigger