Pick up the free demo at Instant C# (
www.instantcsharp.com). It's a
lot easier to get the answer there than to keep posting these
snippets:
//INSTANT C# NOTE: These were formerly VB static local variables:
private static int intLastItem;
private static int intCount;
private static int intTotalPage;
private static int lintCurrentPage;
public void CustomPager(object STCPagerGrid)
{
int intCtr = 0;
//INSTANT C# NOTE: VB local static variable moved to class level
//Static intLastItem As Integer
//INSTANT C# NOTE: VB local static variable moved to class level
//Static intCount As Integer
//INSTANT C# NOTE: VB local static variable moved to class level
//Static intTotalPage, lintCurrentPage As Integer
//INSTANT C# NOTE: VB local static variable moved to class level
//Static lintCurrentPage As Integer
int ForTemp1 = STCPagerGrid.Controls.Count - 1;
//INSTANT C# NOTE: The ending condition of VB 'For' loops is tested
only on entry to the loop. Instant C# has created a temporary
variable in order to use the initial value of
STCPagerGrid.Controls.Count - 1 for every iteration:
for (intCtr = 0; intCtr <= ForTemp1; intCtr++)
{
if (STCPagerGrid.Controls.GetType().ToString() ==)
{
"System.Web.UI.WebControls.DataGridLinkButton" Then;
if
(Microsoft.VisualBasic.Information.IsNumeric(STCPa gerGrid.Controls[intCtr].Text)
== true)
{
//ORIGINAL LINE: And Left(STCPagerGrid.Controls[intCtr].text, 1)
<> "[" Then
& STCPagerGrid.Controls[intCtr].Text.Substring(0, 1) != "[" Then;
STCPagerGrid.Controls[intCtr].Text = "[" +;
STCPagerGrid.Controls[intCtr].Text + "]";
if (STCPagerGrid.Controls[intCtr].Text == "..." & intCtr)
{
= 0 Then;
STCPagerGrid.Controls[intCtr].Text = "[<<]";
}
if (STCPagerGrid.Controls[intCtr].Text == "..." & intCtr)
{
Microsoft.VisualBasic.ControlChars.Quote:
0 Then;
STCPagerGrid.Controls[intCtr].Text = "[>>]";
}
}
if (STCPagerGrid.Controls[intCtr].Controls.Count > 0)
{
CustomPager(STCPagerGrid.Controls[intCtr]);
}
}
}
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com