主页表格
<form id="form1" runat="server">
Search your keyword
<asp:TextBox ID="search" onkeydown="javascript:doAJAX(this.value)" runat="server">
</asp:TextBox>
</form>
这是文本框搜索关键字的代码。当一个键被按下时,我的代码正在发送上一个输入的键。如何获取当前密钥?该doAJAX
函数又调用另一个 aspx 页面并填充此页面。
Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Try
'Response.ContentType = "application/xhtml+xml"
'Build CategoriesList
Dim strSQL As String
Dim Mytable As DataTable
strSQL = "exec GetAJAXSearchResults '"
strSQL &= Request("keyword")
strSQL &= "', " & AppSettings("SiteId")
Mytable = myLib.GetData(strSQL)
For Each row As DataRow In Mytable.Rows
'strChartList &= row.Item("title") & "<br/>"
strChartList &= row.Item("PID") & " " & row.Item("title") & "<br/>"
Next row
strChartList &= "</p>"
这是具有过程详细信息的 aspx 代码...我尝试在 for 之前放置一个 if 语句..但没有工作..