Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ASP.netに、URLフラグメント(別名ハッシュ)を取得するオプションがあるのに、フラグメントを取得できないのはなぜですか。requestContext.HttpContext.Request.Url.Fragment。
requestContext.HttpContext.Request.Url.Fragment
HttpContextサーバーがフラグメントを認識しないため、フラグメントを取得できないことを理解しましたが、オブジェクトにオプションが含まれている理由を知りたいと思います。
HttpContext
HttpContext.Request.UrlのタイプはSystem.Uriであり、そのタイプにはFragmentパラメーターがあるためです。System.Uriを単独で使用する場合、フラグメントを追加/読み取ることは確かに可能です。ASP.netのランタイムで使用されるこのシナリオでは、適用できません。