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 pageTitle = new PageManager().GetPageNode(new Guid(SiteMapBase.GetCurrentProvider().CurrentNode.Key)).Title; Session['"' + pageTitle + '"'] == true
コードを次のように変更します。
string pageTitle = new PageManager().GetPageNode(new Guid(SiteMapBase.GetCurrentProvider().CurrentNode.Key)).Title; Session[pageTitle] = true; //remove double = as it is for comparing, //also get rid of single quotes