There is no way I’m the only one who thinks that I’m missing such a shortcut in Visual Studio.
In the markup (aspx) I begin writing the event name "On…" then choose the event I need. What I’m looking for now is functionality for auto-inserting the event name and the delegate method in the codebehined exactly as it’s done from the Design view.
It’s a simple and very helpful functionality that’s obviously missing – or I havn’t been able to localize it yet.
Does any one know if it can be done in VS? Maybe using ReSharper?
That would be nice. The closest I know of is to use the properties window. You can click the yellow lightening bolt icon, and type the name of the event in there. This will create the handler in the code behind. Alternatively, if you’re handling the
default event of the control, you can simply double click the control in design view and it will handle the default event of that control, also creating the handler in the code behind.
In case you’re no aware of these already…
The properties lightning icon method is about what I was looking for.
As mentioned in my post, I know about the Design thing but was looking for a way to do that from the editor side.
It could have been nicer and faster if (after specifying the type of event directly in the editor) there was a shortcut that produces the dafault name of the event and the event method in the code behined. 99.9% procent of the programmers use the default
given method name for the selected event like: OnPageIndexChanging="MyGridView_PageIndexChanging".
It’s deffenly not a complicated functionality to add to VS