I get this error message: " onset is not a public member of Exp2Syn"
That's a syntax error message, and it means that you need to RTM ("Read The Manual" i.e. the Programmer's Reference). For the particular questions you ask today, it's also helpful to read chapter 10 of the NEURON Book, or if you don't have the book read this preprint of that chapter https://www.neuron.yale.edu/ftp/ted/boo ... xedref.pdf
Now a short summary that should not be taken as a substitute for the recommended reading.
AlphaSynapse was not implemented as a means to connect two cells with a synapse. It generates a single conductance transient of a particular peak amplitude that starts at a fixed time. ExpSyn and Exp2Syn are quite different, and they have different parameters than AlphaSynapse does--e.g. they have no onset or gmax parameter. They are event-driven conductance-change synaptic mechanisms, which means they do nothing until they receive an event delivered by a NetCon ("Network Connection"). Each event received by an ExpSyn or Exp2Syn triggers a conductance change whose amplitude is controlled by the NetCon's weight, but whose time course and reversal potential are specified by the point process's own parameters. Furthermore, multiple synapses of the same type (same time constants and reversal potential) that are electrically close to each other can be represented by a single ExpSyn or Exp2Syn that is driven by multiple NetCons; this is more efficient than using a separate Exp*Syn to represent each synapse.
"What is a NetCon and where do these events come from?" Explained in chapter 10 and the Programmer's Reference documentation of NetCon. Depending on what you are trying to do, you might want to use a NetStim (see Programmer's Reference) as an event source for a NetCon, or if you only want a single event, use the NetCon's event method.
Major hint: if you are using something for the first time, try it out on a toy model before you try to use it in a complex model. Suggest you make a single compartment passive model cell with an Exp2Syn that is driven by a NetCon that monitors a NetStim for events. You might even find it instructive to work through the Network Builder tutorials at http://www.neuron.yale.edu/neuron/docs
The result is then that the model works. But I get a strange shape of the EPSPs and varying TAU1 and TAU2 doesn't affect the shape (only Rm does).
The only thing worse than buggy code that fails with an error message, is buggy code that runs and generates no error message. If you replaced all AlphaSynapses with Exp2Syns, but you're not driving the Exp2Syns with events delivered by NetCons, the "EPSP" you're seeing isn't an EPSP. This means your code has two bugs: (1) none of the synaptic mechanisms is ever activated, and (2) your model is generating a spurious perturbation of membrane potential. (1) is easy to fix. (2) suggests that there is an error in the specification of the biophysical properties of your model cell, and/or that the model is not being initialized to its steady state; perhaps the model has nonuniform membrane properties?