Skip to content

Commit b62e50b

Browse files
matthewdustinsoftware
authored andcommitted
add query string to path
add query string to path
1 parent d6ff200 commit b62e50b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/React.Router/HtmlHelperExtensions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ public static IHtmlString ReactRouter<T>(
101101
try
102102
{
103103
var response = htmlHelper.ViewContext.HttpContext.Response;
104-
path = path ?? htmlHelper.ViewContext.HttpContext.Request.Path;
104+
var request = htmlHelper.ViewContext.HttpContext.Request;
105+
path = path ?? request.Path.ToString() + request.QueryString;
105106

106107
var reactComponent
107108
= Environment.CreateRouterComponent(

0 commit comments

Comments
 (0)