Hi<br/><br/>There are ways <b>of advertising/to advertise</b> online for free.<br/><br/>This is the most effective way <b>of attracting/to attract</b> potential customers to your offer.<br/><br/>--- Are both forms correct?