Page.Code=
"1"
asadefiningvaluefor
only
the current
user
iscurrentlylocated on the site, orchangesin
the value of
all visitors
Page.Code?that is, thesessionincludesa private datato each visitor, such as?
Ishe
unreasonable
to keep
the number of
active categories
Page.ActCat?Page.ActCat=
125 (the
category
id),for
allusersin
at the moment
is125?sessionamany
do not trust.How
different content
foreach useridentificationthrough the pagesI need tocarry with me.
The
value
will
be the same
foreveryone
isdifferent?
Yes.
aspnet1071
Page,Is
like
a session?
In that respect, yes, but Page.CatId will only be accessible from the page where it is set. Session["catId"] is available on any page all the time that the session is still alive.
aspnet1071
Member
64 Points
35 Posts
PageData or Page
Jul 07, 2011 08:19 AM|LINK
Hello. PageData used when moving from one page of information. So, PageData ["Mycode"] What is the difference between the Page.MyCode? Thank you.
Mikesdotnett...
All-Star
155649 Points
19987 Posts
Moderator
MVP
Re: PageData or Page
Jul 07, 2011 08:45 AM|LINK
There is no practical difference. You can consider Page.MyCode as short for PageData["MyCode]
Web Pages CMS | My Site | Twitter
aspnet1071
Member
64 Points
35 Posts
Re: PageData or Page
Jul 08, 2011 11:29 AM|LINK
Page.Code = "1" as a defining value for only the current user is currently located on the site, or changes in the value of all visitors Page.Code? that is, the session includes a private data to each visitor, such as?
Mikesdotnett...
All-Star
155649 Points
19987 Posts
Moderator
MVP
Re: PageData or Page
Jul 08, 2011 12:29 PM|LINK
I'm not sure what you are asking, but if you set Page.Code = 1, then it will be 1 for all users. If you set the value based on the user, such as
then the value is user-specific.
If you want to store data across multiple requests on a user-by-user basis, you should use Session.
Web Pages CMS | My Site | Twitter
aspnet1071
Member
64 Points
35 Posts
Re: PageData or Page
Jul 08, 2011 01:41 PM|LINK
Is he unreasonable to keep the number of active categories Page.ActCat? Page.ActCat = 125 (the category id), for all users in at the moment is 125? sessiona many do not trust. How different content for each user identification through the pages I need to carry with me.
aspnet1071
Member
64 Points
35 Posts
Re: PageData or Page
Jul 10, 2011 05:51 PM|LINK
Mikesdotnetting?
Mikesdotnett...
All-Star
155649 Points
19987 Posts
Moderator
MVP
Re: PageData or Page
Jul 10, 2011 06:01 PM|LINK
Sorry - can you rephrase your last question? I don't understand what you are asking.
Web Pages CMS | My Site | Twitter
aspnet1071
Member
64 Points
35 Posts
Re: PageData or Page
Jul 10, 2011 06:31 PM|LINK
The first visitor clicked on the category id is 5. was assigned the value of the resulting page Page.CatId = 5.
at the same time, a different computer;
The second visitor clicked on the category id is 8. was assigned the value of the resulting page Page.CatId = 8.
The value will be the same for every one is different? Page, Is like a session?
Mikesdotnett...
All-Star
155649 Points
19987 Posts
Moderator
MVP
Re: PageData or Page
Jul 10, 2011 06:46 PM|LINK
Yes.
In that respect, yes, but Page.CatId will only be accessible from the page where it is set. Session["catId"] is available on any page all the time that the session is still alive.Web Pages CMS | My Site | Twitter
aspnet1071
Member
64 Points
35 Posts
Re: PageData or Page
Jul 10, 2011 07:01 PM|LINK
I'm sorry for my English is not enough. Sample coding;
category.cshtml Page.Catid = UrlData[1].AsInt(); @RenderPage("~/left.cshtml")Is a problem for visitors to experience different?