.Net adding a prefix ctl00_CPHPageContents_ to control IDs
Question
I have an asp.net C# web forms application in .net framework 4
In my pages, when I view html source it changes control IDs to something like ctl00_CPHPageContents_txtUserID
actually it is txtUserID
This application was first in Framework 3.5 and IDs were generated like CPHPageContents_txtUserID
So, in short, in Framework 3.5 Id was CPHPageContents_txtUserID
and now in Framework 4 ID is ctl00_CPHPageContents_txtUserID
which is breaking our automation tests. Can I remove this ctl00
added by Framework 4?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow