SessionPageStateSection.DefaultHistorySize Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines the size of the page history.
public: int DefaultHistorySize = 9;
public const int DefaultHistorySize = 9;
val mutable DefaultHistorySize : int
Public Const DefaultHistorySize As Integer = 9
Field Value
Value = 9Examples
The following code example shows how to obtain the DefaultHistorySize property from the configuration file associated with an existing Web application.
// Get the history size.
int historySize =
sessionPageState.HistorySize;
string msg = String.Format(
"Current history size: {0}\n",
historySize.ToString());
Console.Write(msg);
if (!sessionPageState.IsReadOnly())
{
// Double current history size.
sessionPageState.HistorySize =
2 * sessionPageState.HistorySize;
configuration.Save();
historySize =
sessionPageState.HistorySize;
msg = String.Format(
"New history size: {0}\n",
historySize.ToString());
Console.Write(msg);
}
' Get the history size.
Dim historySize As Integer = _
sessionPageState.HistorySize
Dim msg As String = _
String.Format( _
"Current history size: {0}" + _
ControlChars.Lf, historySize.ToString())
Console.Write(msg)
If Not sessionPageState.IsReadOnly() Then
' Double current history size.
sessionPageState.HistorySize = _
2 * sessionPageState.HistorySize
configuration.Save()
historySize = sessionPageState.HistorySize
msg = String.Format( _
"New history size: {0}" + _
ControlChars.Lf, historySize.ToString())
Console.Write(msg)
End If
Applies to
See also
Werk met ons samen op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en bekijken. Raadpleeg onze gids voor inzenders voor meer informatie.
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort: Gedurende 2024 worden GitHub Issues uitgefaseerd als het feedbackmechanisme voor inhoud. Dit wordt vervangen door een nieuw feedbacksysteem. Ga voor meer informatie naar:Feedback verzenden en bekijken voor