共用方式為


RouteData.PushState 方法

定義

在附加至 之前,先建立 的 RouteData 目前狀態快照集,再合併至 Values ,併合並 valuesdataTokensDataTokensRoutersrouter

呼叫 Restore() ,以在呼叫 PushState(IRouter, RouteValueDictionary, RouteValueDictionary) 時將這個 RouteData 的狀態還原至 狀態。

public:
 Microsoft::AspNetCore::Routing::RouteData::RouteDataSnapshot PushState(Microsoft::AspNetCore::Routing::IRouter ^ router, Microsoft::AspNetCore::Routing::RouteValueDictionary ^ values, Microsoft::AspNetCore::Routing::RouteValueDictionary ^ dataTokens);
public Microsoft.AspNetCore.Routing.RouteData.RouteDataSnapshot PushState (Microsoft.AspNetCore.Routing.IRouter router, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteValueDictionary dataTokens);
public Microsoft.AspNetCore.Routing.RouteData.RouteDataSnapshot PushState (Microsoft.AspNetCore.Routing.IRouter? router, Microsoft.AspNetCore.Routing.RouteValueDictionary? values, Microsoft.AspNetCore.Routing.RouteValueDictionary? dataTokens);
member this.PushState : Microsoft.AspNetCore.Routing.IRouter * Microsoft.AspNetCore.Routing.RouteValueDictionary * Microsoft.AspNetCore.Routing.RouteValueDictionary -> Microsoft.AspNetCore.Routing.RouteData.RouteDataSnapshot
Public Function PushState (router As IRouter, values As RouteValueDictionary, dataTokens As RouteValueDictionary) As RouteData.RouteDataSnapshot

參數

router
IRouter

IRouter要附加至 Routers 的 。 如果 null 為 , Routers 則不會變更。

values
RouteValueDictionary

RouteValueDictionary要合併到 的 Values 。 如果 null 為 , Values 則不會變更。

dataTokens
RouteValueDictionary

RouteValueDictionary要合併到 的 DataTokens 。 如果 null 為 , DataTokens 則不會變更。

傳回

RouteData.RouteDataSnapshot 取目前狀態的 。

適用於