Developer forum

Forum » Development » Linkmanager

Reply

When I try to use the LinkManager I get this error:


Compiler Error Message: CS1502: The best overloaded method match for 'Dynamicweb.Gui.LinkManager(string, string, ref bool, bool)' has some invalid arguments


and here is the code



searchResultAddWaitListItem


<%=Gui.LinkManager("myPage", "searchResultAddWaitListItem", false, false)%>



Anybody see what I do wrong here?


Replies

 
Nicolai Høeg Pedersen
Reply

Hi


In C# when you have a parameter that has to be passed as ref, you need to first instantiate a variable, assign it the value and then pass it as parameter to the method using the ref keyword:


bool disableParagraphOptions = false;


HttpContext.Current.Response.Write(Dynamicweb.Gui.LinkManager("", "", ref disableParagraphOptions, false));


The second parameter is for some reason ref - an error we can not change as with the optional parameters because of all the Dynamicweb custom modules out there.

 

You must be logged in to post in the forum