Html.RenderAction/RenderPartial can send parameter by routeValues
in Global.asax.vb
in View(.aspx)
in Control(.vb)
in Global.asax.vb
routes.MapRoute( _
"Default", _
"{controller}/{action}/{id}/{parameter}", _
New With {.controller = "Home", .action = "Index", .id = "" , .parameter="" } _
)
in View(.aspx)
< %Html.RenderAction("Login", "Member", New With {.id = "1234", .parameter="ABC"})%>
<%Html.RenderPartial("Login", "Member", New With {.id = "1234", .parameter="ABC"})%>
in Control(.vb)
Dim id As String = RouteData.Values("id")
Dim parameter As String = RouteData.Values("parameter")
留言