Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » DW9 equivalent of Pageview.User.SecondaryUserID.ToString()

DW9 equivalent of Pageview.User.SecondaryUserID.ToString()

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

I have DW 8 code using this:

Pageview.User.SecondaryUserID.ToString()

What's the DW 9 equivalent? Would this work?

Pageview.User.CurrentSecondaryUser != null ? Pageview.User.CurrentSecondaryUser.ID.ToString() : ""

Imar


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Yes, except your PageView.User can also be null

Votes for this answer: 1
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Thanks, yeah, ran into that already ;-)

 

You must be logged in to post in the forum