XModPro

CommandLink Redirect not working

Myron Weber Myron Weber asked May 9, 2018
Active May 11 · Viewed 2720 times
<pre> &lt;CustomCommands&gt; &lt;DataCommand CommandName="HideItem" CommandText="Update FSVS_Ontrack set Status = 'Hide', updated = getdate(), updated_by = @user WHERE [id] = @id"&gt; &lt;Parameter Name="id" /&gt; &lt;parameter name="user" /&gt; &lt;/DataCommand&gt; &lt;/CustomCommands&gt; &lt;DetailTemplate&gt; &lt;xmod:CommandLink Text='Hide' OnClientClick="return confirm('Are you sure you want to hide this?');" Redirect="http://dnndev.com"&gt; &lt;Command Name="HideItem" Type="Custom"&gt; &lt;Parameter name="user" value='[[User:ID]]' /&gt; &lt;Parameter Name="id" Value='[[id]]' /&gt; &lt;/Command&gt; &lt;/xmod:CommandLink&gt; &lt;/DetailTemplate&gt; </pre> <p>The code above works in terms of executing the custom command, but I can't get the redirect to work. It just comes back to the same page. I've tried lots of variations (eg taking out the OnClientClick), but no luck. </p> <p>We're running v. 4.7.6 </p>

1 Answer

Loading answers...