As title i'm trying to implement an AntiForgery Token in Asp.net 4.6 framework. I've a Site.Master page and i'm studying this article to adapt on my site How To Fix Cross-Site Request Forgery (CSRF) using Microsoft .Net ViewStateUserKey and Double Submit Cookie
Now i've converted from c# to vb.net and i put the code in my masterpage.
By compiler notes me that
Page.PreLoad += AddressOf master_Page_PreLoad
is a event and i can't declare directly.
Anyway i don't understand if it's right way to solve problem or exists another way to follow.