ASP.NET MVC - can I create invisible Ajax.ActionLink ()?

Is it possible to create an invisible Ajax.ActionLink?

Ajax.ActionLink("", "Action", Args, AjaxArgs)

      

The above doesn't work, LinkName (1st argument) cannot be Null or Empty ...

+1


a source to share


2 answers


You can add style html attribute:



Ajax.ActionLink("LinkText", "Action", Args, AjaxArgs,new{style="display:none;"})

      

+3


a source


You may just need to wrap it in a div like this:



<div style="{display:none}">Ajax.ActionLink("", "Action", Args, AjaxArgs)</div>

      

+1


a source







All Articles