SHANGHAI, China  It's an image that Shanghai's aggressively modern leaders want to shed: people rinsing out their chamber pots in alleys in the shadows of ultramodern skyscrapers.

The city of 20 million, standard-bearer of communist China's march into capitalism, is in the midst of a massive toilet modernization. It wants anyone without a toilet at home to have a public facility a few steps away, and offers a hot line for those who can't find one.

This month Shanghai hosted the World Toilet Expo and Forum in hopes of getting advice on how to spruce up its loos. "We have observed that the state of public toilets, especially men's toilets, is not up to standard and poses quite a challenge," Hong Hao, deputy secretary general of Shanghai's city government, told the gathering.

Finding a toilet has traditionally been simply a matter of following one's nose.

Until recently, most were unheated, open-trench affairs. Stalls were only waist-high, sometimes without doors. Running water was rare. Toilet tissue and soap? Forget about it.

Now Shanghai says it has one toilet every 1,000 feet, with signs in universal symbols all over town showing the direction and distance to the nearest.

The city has built thousands of new apartment buildings with modern plumbing, but in many older housing districts, chamber pots are used at night, then toted to the nearest public toilet to be emptied next morning.

Public toilets in choice tourist locations tend to be clean and well-maintained. Some are assigned one to five stars under a municipal rating system based on features ranging from quality of toilet tissue to such high-tech touches as automatic flushing. The best charge up to 50 fen (6 cents).

Showcase public toilets include one in a suburban park designed to look, inside and out, like a grotto. Others have digital displays indicating how long each stall has been occupied. One Japanese restaurant, Hinotori, has goldfish aquariums beside the toilets and under the sinks.

Though the city is promising the latest in high-tech, the exhibits at the expo were strictly utilitarian -- no fancy sprays, fans or bottom heaters.

But there were plenty of anti-bacterial tiles, water-saving urinals, diaper-changing tables.

"We're showing only technology that makes sense," said Dominique Facon, vice president for marketing at American Standard in Shanghai, as technicians demonstrated a toilet that easily handled 14 golf balls in one flush.

The most unusual exhibit was a $2,300 composting unit that inventor Andy Tung says uses as little as 100 pounds of sawdust a year to convert waste into smell-free, safe organic fertilizer.

Tung said his company, Shinnichi Mechanical & Electrical Equipment Co., has installed trial versions in public washrooms in a Chinese city park, in an office building and in a Beijing residential district.

The exhibition was sponsored by the World Toilet Organization, which represents cleanliness groups in 17 countries and is based in famously tidy Singapore, which fines people who fail to flush public toilets.

"Better toilets will bring more tourists, investments, lower public health costs, and increase the economic and spiritual well-being of the people," the organization's founder, Jack Sims, told the gathering.

"Our happiness cannot be complete without a proper and pleasant toilet environment."