I'm still unable to get the value to be selected after I submit my page. There must be something small in what I have code thus far. Could I please get a second, or third, fourth... glance at my code on how I have this written. Thank you
----------------------------------------------------------------------
CODE BEHIND FILE FOR ASPX file:
----------------------------------------------------------------------
Imports NewLeafTech
Public Class AddAccountsReceivable
Inherits System.Web.UI.Page
Protected WithEvents ucClients As Clients
Protected WithEvents PlaceHolder1 As System.Web.UI.WebControls.PlaceHolder
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
ucClients = LoadControl("Clients.ascx"

PlaceHolder1.Controls.Add(ucClients)
End Sub
#End Region
Private Sub Page_Load(ByVal Sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Sub AddAR(ByVal Sender As Object, ByVal e As EventArgs)
Dim o_AR As New NewLeafTech.Finance.AccountsReceivable()
o_AR.Client = ucClients.ClientValue
End Sub
End Class
----------------------------------------------------------------------
ASPX File:
----------------------------------------------------------------------
<form id="Form1" method="post" runat="server">
<asp

laceHolder id="PlaceHolder1" runat="server"></asp

laceHolder>
</form>
----------------------------------------------------------------------
Clients.ascx File
----------------------------------------------------------------------
Imports NewLeafTech
Public MustInherit Class Clients
Inherits System.Web.UI.UserControl
Protected WithEvents ddlClient As System.Web.UI.WebControls.DropDownList
Public ClientValue As Integer
Public ClientValueIndex As Integer
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim o_Client As New NewLeafTech.Finance.ClientAdmin()
With ddlClient
.DataSource = o_Client.GetClientsAll
.DataTextField = "ClientName"
.DataValueField = "ClientID"
If Page.IsPostBack Then
ClientValue = .SelectedItem.Value
ClientValueIndex = .SelectedIndex
End If
.SelectedIndex = ClientValueIndex
.DataBind()
End With
End Sub
End Class
regards,
Brian