Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load GetCompanyDetails() End Sub Protected Sub GetCompanyDetails() Dim da As New SqlDataAdapter("SELECT [COMPCODE], [COMPNAME] FROM [TBL_COMPANY_COD]", strcon) Dim dt As New Data.DataTable da.Fill(dt) da.Dispose() ddLCmp.DataSource = dt ddLCmp.DataTextField = "COMPNAME" ddLCmp.DataValueField = "COMPCODE" ddLCmp.DataBind() 'ddlcmp.ClearSelection() End Sub End Class
DropDown
false
Page_Load
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not IsPostBack GetCompanyDetails() End If End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)