用ajax(vb.net) 实现dropdownlist二级无刷新联动~!
2009-01-09 16:37
756 查看
说说vb.net ajaxpro 实现dropdownlist二级无刷新联动~!
Sub Page_Load() Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
DropDownList1.Attributes("onchange") = "ShowCity(this.options[selectedIndex].value)"
End If
AjaxPro.Utility.RegisterTypeForAjax(GetType(Other_Register2))
End Sub
Function GetCity() Function GetCity(ByVal sproid) As DataTable
Dim sqlconnection As New SqlConnection(ShareFunction.GetDBConnectionString())
sqlconnection.Open()
Dim sql As String = "select TB_cityID,TB_cityName from TB_city where proID=" & ShareFunction.SafeRequest(sproid, 1) & ""
Dim dataada As New SqlDataAdapter(sql, sqlconnection)
Dim dt As New DataTable
dataada.Fill(dt)
Return dt
End Function
这里使用dataadapter对象将查询数据存入datatable中~!
ajaxpro.2.dll
Sub Page_Load() Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
DropDownList1.Attributes("onchange") = "ShowCity(this.options[selectedIndex].value)"
End If
AjaxPro.Utility.RegisterTypeForAjax(GetType(Other_Register2))
End Sub
Function GetCity() Function GetCity(ByVal sproid) As DataTable
Dim sqlconnection As New SqlConnection(ShareFunction.GetDBConnectionString())
sqlconnection.Open()
Dim sql As String = "select TB_cityID,TB_cityName from TB_city where proID=" & ShareFunction.SafeRequest(sproid, 1) & ""
Dim dataada As New SqlDataAdapter(sql, sqlconnection)
Dim dt As New DataTable
dataada.Fill(dt)
Return dt
End Function
这里使用dataadapter对象将查询数据存入datatable中~!
ajaxpro.2.dll
相关文章推荐
- vb.net 实现dropdownlist二级无刷新联动~!
- asp.net DropDownList无刷新ajax二级联动实现详细过程
- asp.net DropDownList无刷新ajax二级联动实现详细过程
- asp.net DropDownList无刷新ajax二级联动实现详细过程
- asp.net DropDownList无刷新ajax二级联动实现详细过程
- Ajax实现无刷新三联动下拉框 VS2005 ASP.NET DropDownList
- AJAX实现DropDownList无刷新二级联动(转载)
- 用ASP.NET AJAX实现无刷新多个DropDownList的动态联动
- ASP.NET中使用DropDownList实现无刷新二级联动详细过程
- AJAX实现DropDownList无刷新二级联动
- ajax实现dropdownlist无刷新二级联动
- ASP.NET jQuery 食谱24 (通过AJAX简单实现DropDownList二级联动)
- 整理:dotNet Ajax实现无刷新省市县三级联动菜单
- asp.net实现无刷新DropDownList联动控件
- asp.net下使用AjaxPro实现二级联动代码
- ASP.NET实现无刷新DropDownList联动
- ajax实现无刷新两级联动DropDownList
- ajax实现dropdownlist与datagrid或Repeater无联动刷新
- ASP.NET利用JavaScript实现无刷新闪烁二级联动菜单
- 访问Access数据库实现DropDownList二级异步联动(ASP.NET WebForm开发方式)