You would need to leave, get a fiance(e) visa and come back. Used to be, you could marry on whatever visa, and then just get the ILR or whatever. Things changed about a year ago from my understanding.
Some people may suggest just getting married and claiming you "did not know" but ignorance is not an excuse for illegal behavior, and many a immigration official will say "too bad, so sad...Next please!" so watch your Ps and Qs with this issue. It's better to spend the extra money on the proper visas than to wed, and be forced from the country, posibly never being able to return because of lack of proper visas.
For me, my work visa expired and I had to leave the country. Yes, it sucks, but I am only in the states now until our wedding, which would have happened regardless of my visa wielding job continuing or not. Of course, now that I'm back state side for a wee while, the DF is thinking that maybe we'll settle in Seattle for a couple years before heading back to Scotch-land...
I'm sure you will do what works best for your situation, just be sure to look into the legalities of each visa before you jump into the water...