编程之道VB.NETt程序设计入门-589M.zip

源代码在线查看: searchmodule.ascx.vb

软件大小: 432134 K
上传用户: ahljj
关键词: NETt 589 zip VB
下载地址: 免注册下载 普通下载 VIP

相关代码

				Public MustInherit Class SearchModule
				    Inherits System.Web.UI.UserControl
				    Protected WithEvents SearchDropDownList As System.Web.UI.WebControls.DropDownList
				    Protected WithEvents SearchTextBox As System.Web.UI.WebControls.TextBox
				    Protected WithEvents SearchButton As System.Web.UI.WebControls.Button
				
				#Region " Web 窗体设计器生成的代码 "
				
				    '该调用是 Web 窗体设计器所必需的。
				     Private Sub InitializeComponent()
				
				    End Sub
				
				    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
				        'CODEGEN: 此方法调用是 Web 窗体设计器所必需的
				        '不要使用代码编辑器修改它。
				        InitializeComponent()
				    End Sub
				
				#End Region
				
				    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
				        '在此处放置初始化页的用户代码
				    End Sub
				
				    Public Sub SearchButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SearchButton.Click
				        Dim Url As String
				        Url = "search.aspx?searchType="
				        Select Case SearchDropDownList.SelectedItem.Text
				            Case "按书名"
				                Url &= "Name"
				            Case "按作者"
				                Url &= "Author"
				            Case "按主题"
				                Url &= "Subject"
				        End Select
				
				        Url &= "&searchText="
				        Url &= SearchTextBox.Text
				
				        Response.Redirect(Url)
				    End Sub
				End Class
							

相关资源