请教asp.net 响应回车键 在查询页面,我想实现输入页号(比如3),按回车,显示第3页
代码如下:
Private Sub Tbpage_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Tbpage.TextChanged
If IsNumeric(Tbpage.Text.Trim) And CInt(Tbpage.Text.Trim) > 0 Then
DataGrid1.CurrentPageIndex = CInt(Tbpage.Text.Trim) - 1
Session("cxpage") = Tbpage.Text.Trim - 1
Bindquery()
Else
RegisterClientScriptBlock("提示:", "<script language=javascript>alert('请输入正整数!')</script>")
Exit Sub
End If
End Sub