public void ShowFirst( object s,  EventArgs e) {
      intCurrIndex.Text = "0";
      DataBind();
      }
 public void ShowPrevious( object s,  EventArgs e) {
      intCurrIndex.Text = Cstr(Cint(intCurrIndex.Text) - CInt(intPageSize.Text));
      if ( CInt(intCurrIndex.Text) < 0 ) {
      intCurrIndex.Text = "0";
      }
      DataBind();
      } public void ShowNext( object s,  EventArgs e) {
      if ( CInt(intCurrIndex.Text) + 1 < CInt(intRecordCount.Text) ) {
      intCurrIndex.Text = CStr(CInt(intCurrIndex.Text) + CInt(intPageSize.Text));
      }
      DataBind();
      } public void ShowLast( object s,  EventArgs e) {
       tmpInt as int;      tmpInt = CInt(intRecordCount.Text) % CInt(intPageSize.Text);
      if ( tmpInt > 0 ) {
      intCurrIndex.Text = Cstr(CInt(intRecordCount.Text) - tmpInt);
      } else {
      intCurrIndex.Text = Cstr(CInt(intRecordCount.Text) - CInt(intPageSize.Text));
      }
      DataBind();
}没仔细看   直接手写的  自己调一下哈 :-)

解决方案 »

  1.   

    Public Sub ShowNext(ByVal s As Object, ByVal e As EventArgs)
    这些地方该成
      public void ShowNext(object sender,EventArgs e)
    {}if then 
    else 
    end if
    改成
    if()
    {}
    else
    {}CInt(intCurrIndex.Text)之类的改成(int)(intCurrIndex.Text)所有的语句后面都加;
      

  2.   

    http://dotnet.aspx.cc/ShowDetail.aspx?id=B12283DE-DB20-4322-ACCC-12724442808A
      

  3.   

    http://www.developerfusion.com/utilities/convertvbtocsharp.aspx
    我是在这里来转化的