Solve a small bug in the log summary and add new features
When I developed a log abstract, I met a very strange thing. That is, I have customized the attributes of the two int types, but when I refresh the interface, one of the properties will be reiniterated into 0. Is it possible to use two int type properties at the same time. I think it is impossible, I checked the code carefully, when I was a bit discouraged, I found the secret existence.
At first, I need to define global variables:
Private int int.
Then define an attribute according to the format of WebPart.
/ / Customize how much each page is displayed
[Category ("Defined View")]
[DefaultValue (3)]]
[WebPartStorage (Storage.Personal)]
[FriendlyNameAttribute ("Show Opposite Number")]
[Description ("Please enter an integer")]
[Browsable (TRUE)]
[XMLELEMENT (ElementName = "_ intPerpage")]]
Public int _intPinterPage
{
get
{
Return INTPERPAGE;
}
set
{
INTPERPAGE = VALUE;
}
}
Everyone should pay attention to the red word, I started [Xmlelement (ElementName = "INTPERPAGE")]
It is not wrong when compiling.
Be careful! ! ! !
I added a new function in this WebPart, that is, he will automatically calculate the date of the log, if the date of the release is within three days, it will display a "new" word