ASX technology shares are having another poor session on Thursday.

The S&P/ASX All Technology Index (ASX: XTX) is falling again, leaving it approximately 20% below its 52-week high.

With investors increasingly nervous about technology valuations and the artificial intelligence (AI) boom, the selling could continue.

However, I think further weakness could create some attractive opportunities for long-term investors.

Here are three ASX tech shares I would be looking to buy.

TechnologyOne Ltd ( ASX: TNE )

TechnologyOne would be one of my first choices if ASX tech shares continue falling.

The enterprise software company has an excellent track record, and its latest results suggest there's plenty more growth ahead.

Earlier this week, TechnologyOne reported a 20% increase in profit before tax to $217.6 million, marking its 17th consecutive year of record profit.

Its results also showed that annual recurring revenue (ARR ) increased 18% to $652.1 million.

What I like about TechnologyOne is the predictability of its business. Recurring revenue now represents 93% of total revenue, while customer churn remains below 1%.

And with its SaaS+ offering gaining momentum, alongside growing demand for AI-powered software, I think the company has several opportunities to expand earnings.

Management is targeting more than $1 billion in ARR by FY30. I calculate that this requires average ARR growth of approximately 11.3% per year for FY27 to FY30. Based on the above, I believe it can achieve this.

And if it can hold its profit margins at least steady, I estimate that earnings would grow by more than 50% over the period.

Because of this, I would be happy to take advantage of any share price weakness to buy into that growth story.

Xero Ltd ( ASX: XRO )

Xero is another ASX tech share I would buy if the sell-off deepens.

The cloud accounting specialist has built a strong position among small businesses, and its expansion into payments could provide another substantial growth opportunity.

Its latest half-year results showed revenue increasing 46% to NZ$1.7 billion. And although the acquisition of Melio contributed to that increase, on a comparable basis, revenue grew a healthy 27%.

Meanwhile, free cash flow increased 32% to NZ$238 million on a pro forma basis. I think this demonstrates that Xero is becoming increasingly capable of generating cash while expanding its business.

Management also upgraded its FY27 outlook and announced a share buyback of up to $1 billion. I believe this demonstrates the confidence that it has in its outlook.

AI disruption is a risk to consider, but with considerable opportunities in the US market, I think Xero could deliver strong growth for many years.

Megaport Ltd ( ASX: MP1 )

Megaport is my higher-risk pick of the three. The network connectivity specialist is expanding rapidly into AI infrastructure, creating a potentially significant new growth opportunity.

In September, Megaport announced three new AI infrastructure contracts worth approximately $979 million. This prompted management to upgrade its FY27 revenue guidance to between $720 million and $810 million.

I was also pleased to see the continued growth of its established network business, which reported net revenue retention of 116% in August.

It is important to acknowledge that Megaport's expansion requires enormous capital investment, and delivering its new contracts successfully will be critical.

However, with approximately $362 million in pro forma liquidity remaining after planned FY27 capital expenditure, I believe Megaport has the financial resources to execute its plans and become a considerably larger business over the coming years.

And if another technology sell-off makes its valuation more attractive, I would be very interested in buying.

I wouldn't be surprised to see ASX tech shares fall further if the market volatility continues.

However, I think TechnologyOne, Xero, and Megaport have the potential to emerge from this difficult period as much larger businesses.

For investors willing to ride out the volatility, further weakness could provide an opportunity to buy some promising long-term growth shares.

Wondering where to invest $1,000 right now?

When investing expert Scott Phillips has a stock tip, it can pay to listen. After all, the flagship Motley Fool Share Advisor newsletter he has run for over ten years has provided thousands of paying members with stock picks that have doubled, tripled or even more.*

Scott just revealed what he believes could be the 'five best ASX stocks' for investors to buy right now. We believe these stocks are trading at attractive prices and Scott thinks they could be great buys right now…

* Returns as of 6 March 2025

Buy, hold, sell: Premier Investments, Technology One and Woolworths

Why these 5 ASX shares were downgraded by brokers this week

3 ASX growth shares almost as exciting as the GTA 6 release

5 things to watch on the ASX 200 on Thursday

Think you know the ASX? Try guessing the top 20 ASX shares of the past 20 years

Motley Fool contributor Grace Alvino has no position in any of the stocks mentioned. The Motley Fool Australia’s parent company Motley Fool Holdings Inc. has positions in and has recommended Xero. The Motley Fool Australia has positions in and has recommended Xero. The Motley Fool has a disclosure policy . This article contains general investment advice only (under AFSL 400691). Authorised by Scott Phillips.