Step 1: Use the identity for \(\sin 2x\).
We know that
\[
\sin 2x=\frac{2\tan x}{1+\tan^2 x}
\]
Let
\[
t=\tan x
\]
Then,
\[
dt=\sec^2x\,dx=(1+\tan^2x)\,dx
\]
So,
\[
dt=(1+t^2)\,dx
\]
\[
dx=\frac{dt}{1+t^2}
\]
Step 2: Substitute in the integral.
Given integral is
\[
\int \frac{1+\tan x}{\sin 2x}\,dx
\]
Using \(t=\tan x\),
\[
\int \frac{1+t}{\dfrac{2t}{1+t^2}}\cdot \frac{dt}{1+t^2}
\]
\[
=
\int \frac{1+t}{2t}\,dt
\]
\[
=
\frac{1}{2}\int \left(\frac{1}{t}+1\right)\,dt
\]
Step 3: Integrate.
\[
\frac{1}{2}\int \left(\frac{1}{t}+1\right)\,dt
=
\frac{1}{2}\log t+\frac{t}{2}+C
\]
Substituting back \(t=\tan x\),
\[
=
\frac{1}{2}\log \tan x+\frac{1}{2}\tan x+C
\]
Step 4: Compare with the given form.
Given,
\[
\int \frac{1+\tan x}{\sin 2x}\,dx=A\log \tan x+B\tan x+C
\]
Comparing,
\[
A=\frac{1}{2}
\]
and
\[
B=\frac{1}{2}
\]
Step 5: Find \(4A-2B\).
\[
4A-2B=4\left(\frac{1}{2}\right)-2\left(\frac{1}{2}\right)
\]
\[
=2-1
\]
\[
=1
\]
Step 6: Final conclusion.
Hence,
\[
\boxed{1}
\]