This used to work fine, but appears to have been broken in a very recent
build (258 or 259).
If you declare an event handler for a control in the code in front of a user
control, resharper provides the user with a quick fix if the method does
not exist. However, when you execute that quickfix, the method is created
in the code in front, rather than the code behind. This is especially bad
because Resharper creates and ]]> tags around the script declaration
(see attached screenshot).
Expected behavior: If there is a code behind for the page or user control,
Resharper should put the generated method there (this used to work in earlier
builds, it was just broken in the last build or two).
I have reported this to the tracker (#RSRP-28183)