Skip to content

Commit 5f7c9c4

Browse files
The formatlink function was not applying the correct rewrite pattern—it was incorrectly adding the .aspx extension. (#1115)
To maintain compatibility, the .aspx extension is preserved when loading rewrite patterns, ensuring proper handling for link function with hardcoded argument. (cherry picked from commit 5135b17)
1 parent 701c377 commit 5f7c9c4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

dotnet/src/dotnetframework/GxClasses/Model/URLRouter.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,12 @@ private static void Load(string resourcePattern)
131131
string objectName = map[0];
132132
string url = map[1];
133133
url = url.Replace(@"\=", "=").Replace(@"\\", @"\");
134-
routerList[$"{NormalizedUrlObjectName(objectName)}.aspx"] = url;
134+
#if NETCORE
135+
routerList[$"{NormalizedUrlObjectName(objectName)}"] = url;
136+
routerList[$"{NormalizedUrlObjectName(objectName)}{HttpHelper.ASPX}"] = url;
137+
#else
138+
routerList[$"{NormalizedUrlObjectName(objectName)}{HttpHelper.ASPX}"] = url;
139+
#endif
135140
}
136141
}
137142
}

0 commit comments

Comments
 (0)