I have to add a custom webpart to master page programmatically. I tried to go common way using:
but it says that the URL in incorrect. I have also tried url like
web.Url + "/" + web.MasterUrl
but it still doesn't work. If works perfectly with default.aspx (but webpart is shown only on the homepage not in all pages and it's clear why), so I suppose the problem is that the page has '.master' extension.
What is a correct way to add webpart to master page? I need this webpart to be located on every site page, not only on the homepage.
Thx in advance