I have a gridview with the following template field
<asp:TemplateField> <ItemTemplate> <asp:Button ID="btnLoad" runat="server" Text="Load" CssClass="inptBtn" OnClientClick="return loadPlans(this);" UseSubmitBehavior="false" /> <ItemTemplate> </asp:TemplateField>
This is working fine. In onclick, we run some code that checks the ID generated by .NET for this control and does everything with it. In the past, the generated identifier looked like this:
gvPlans_ctl02_hdPlans
This is still what is generated in our test environments, but in prod it now looks like this:
gvPlans_hdPlans_0
In both environments, the code is definitely the same, but I'm not sure what causes the naming convention to change. I tried to answer google, but the search terms are a bit generalized for this problem, so I will move on to reliable SO. I guess the answer may have something to do with what kind of infrastructure works or something like that. Please let me know if you have any ideas, thanks!
source share