Reputation: 1
Is it possible to localize DataPager control in asp.net?
Among the fields NextPreviousPagerField
can be localized since it offers properties such as FirstPageText
and LastPageText
. But I am having trouble localizing NumericPagerField
. It basically produces the page numbers and I can't find any way of localizing those.
I have tried changing the culture of current thread, but it didn't work.
Upvotes: 0
Views: 74
Reputation: 5370
There are also properties PreviousPageText
and NextPageText
in NumericPagerField control that can be localized as follows (Assuming you are using Resources):
<asp:NumericPagerField
PreviousPageText="<%$Resources:TestSiteResources, PreviousPageText %>"
NextPageText="<%$Resources:TestSiteResources, NextPageText %>"
... />
Also note that:
The value of this property is stored in view state. It can be saved automatically to a resource file by using a designer tool. For more information, see LocalizableAttribute and Globalization and Localization.
Upvotes: 0