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.
次の行でエラーが発生します (型 "string" を "System.Guid" に変換できません)。
userId = Request.QueryString["id"];
httpヘッダーGetでGuid変数を渡す解決策はありますか?
try { userId = new Guid(Request.QueryString["id"]); } catch (FormatException e) { /* * It's possible that the guid is not properly formatted and an * exception will be thrown, so handle that here. */ }