diff --git a/src/Framework/Framework/Controls/RouteLinkHelpers.cs b/src/Framework/Framework/Controls/RouteLinkHelpers.cs
index 800bddff76..4281866015 100644
--- a/src/Framework/Framework/Controls/RouteLinkHelpers.cs
+++ b/src/Framework/Framework/Controls/RouteLinkHelpers.cs
@@ -131,7 +131,7 @@ public static string GenerateKnockoutHrefExpression(string routeName, RouteLink
{
var urlSuffixBase =
control.GetValueBinding(RouteLink.UrlSuffixProperty)
- ?.Apply(binding => binding.GetKnockoutBindingExpression(control))
+ ?.Apply(binding => binding.GetKnockoutBindingExpression(control, unwrapped: true))
?? KnockoutHelper.MakeStringLiteral(control.UrlSuffix ?? "");
var queryParamsArray = control.QueryParameters.RawValues.ToArray();
Array.Sort(queryParamsArray, (a, b) => a.Key.CompareTo(b.Key)); // deterministic order of query params
diff --git a/src/Tests/ControlTests/SimpleControlTests.cs b/src/Tests/ControlTests/SimpleControlTests.cs
index 710543e0f5..8d799d9228 100644
--- a/src/Tests/ControlTests/SimpleControlTests.cs
+++ b/src/Tests/ControlTests/SimpleControlTests.cs
@@ -33,6 +33,8 @@ public async Task RouteLink()
+
+
@@ -40,22 +42,23 @@ public async Task RouteLink()
+
+
-
+
-
-
+
"
@@ -458,6 +461,8 @@ public class BasicTestViewModel: DotvvmViewModelBase
public int[] IntArray { get; set; }
+ public string UrlSuffix { get; set; } = "#something";
+
public GridViewDataSet Customers { get; set; } = new GridViewDataSet() {
RowEditOptions = {
EditRowId = 1,
diff --git a/src/Tests/ControlTests/testoutputs/SimpleControlTests.RouteLink.html b/src/Tests/ControlTests/testoutputs/SimpleControlTests.RouteLink.html
index 813a61ad12..909266dd3b 100644
--- a/src/Tests/ControlTests/testoutputs/SimpleControlTests.RouteLink.html
+++ b/src/Tests/ControlTests/testoutputs/SimpleControlTests.RouteLink.html
@@ -11,6 +11,9 @@
My Label
+
+ Click me
+
Click me
@@ -20,6 +23,9 @@
My Label
+
+ Click me
+
Click me
@@ -27,7 +33,7 @@
Click me
- Click me
+ Click me
My Label
@@ -39,7 +45,7 @@
Click me
- Click me
+ Click me
My Label