Microsoft Corp. and Google Inc. told lawmakers Wednesday that Congress should pass basic privacy legislation to protect information about consumers, such as the data being gathered about people's Web surfing habits in order to pinpoint Internet advertising.

At a Senate Commerce Committee hearing on online advertising, representatives of the two technology rivals said meaningful privacy rules should be based on three core principles: Consumers should be clearly notified what information is being collected about them; people should control how that information is used; and such data should be secured to ensure it does not fall into the wrong hands.

The Commerce Committee held its hearing amid mounting concern about the volume of personal information being gathered about consumers as they surf the Web — including the sites they visit and the search terms they look up — as well as the many ways that information is mined to deliver targeted ads.

One focus of the hearing was a small Silicon Valley startup called NebuAd Inc., which works with Internet service providers to track many of their subscribers' online interests and serve up targeted ads based on that behavior.

• Click here to visit FOXNews.com's Cybersecurity Center.

While Congress has not taken up a comprehensive privacy bill, privacy watchdogs are hoping that Wednesday's hearing could lay the foundation for eventual legislation.

North Dakota Democrat Byron Dorgan, who chaired the panel, pledged more hearings.

"The Internet brings the world to your fingertips ... but I would hope that every consumer traveling on the Internet would have the opportunity to understand what kind of information trail they are leaving behind," Dorgan said.

The Senate hearing also came as the Federal Trade Commission is working to draft a framework by which online advertising companies can regulate themselves.

Lydia Parnes, director of the FTC's bureau of consumer protection, told the panel that "self-regulation is the best approach" to balancing consumer protection with ad-supported business models that let much of the Internet's content and services be available for free.

"Online advertising is the engine that drives the Internet economy," Microsoft associate general counsel Mike Hintze testified Wednesday. Microsoft also supports industry self-regulation.

That sentiment was echoed by Sen. Jim DeMint, R-S.C., who warned that too much government regulation could inhibit the growth of one of the country's best "showcases of free enterprise."

Google's chief privacy counsel, Jane Horvath, added that her company makes privacy a priority since the success of its business depends on the trust of its users.

But Leslie Harris, chief executive of the Center for Democracy & Technology, a civil-liberties group, countered that consumers often don't have a good understanding of how their personal information is being tracked and used.

"Self-regulation is not the whole answer," Harris said.

Chris Kelly, chief privacy officer for online social networking company Facebook Inc., offered a different approach.

Kelly testified that Facebook — which is recovering from a privacy storm over "Beacon," a program that tracked users' online purchases — advocates giving its members online tools for controlling who gets to see their personal information.