You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @Kalyan-Basa . Assuming your areas are registered in the RegisterRoutes method, there is an overload of NavigateToInitialPage that takes a dictionary of route values. This can be used to populate the area value.
var routeValues = new Dictionary<string, object> { { "area", "Area1" } };
SUT.NavigateToInitialPage<TestController, TestPage>(c => c.Details(23), routeValues);
Activity
mwhelan commentedon Mar 23, 2017
Hi @Kalyan-Basa . Assuming your areas are registered in the RegisterRoutes method, there is an overload of NavigateToInitialPage that takes a dictionary of route values. This can be used to populate the area value.
Thanks
Kalyan-Basa commentedon Mar 23, 2017
Hi @mwhelan , I have tried the above approach but this how my URL is getting formed (Got this from browser Developer Tools.)
http://localhost:519/Test/Details?area=Area1
whereas, I wanted it to be
http://localhost:519/Area1/Test/Details
Thanks
mwhelan commentedon Mar 23, 2017
Not sure if 'area' should be case sensitive? Try
Kalyan-Basa commentedon Mar 23, 2017
No, it doesn't help.
mwhelan commentedon Mar 23, 2017
Do you have the areas registered in RegisterRoutes method?
Kalyan-Basa commentedon Mar 23, 2017
Yes, I've my areas registered in MVC application like the below.