L
Learner
Hello,
We have a need to customize the CreateUserWizard and we put a
DropDownList control in there. And we are filling that DropDownControl
( _drplDealers) in the page_load event of the code behind page on which
the CreatUserWizard control is existing.
This my Page_load event thats filling the drop down and this works fine
I am getting the data.
*******************************************************************************************************
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
drplDealerShipID =
CType(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("_drplDealers"),
DropDownList)
Dim GetDealers As SqlDataReader = GetGroundingBL.GetDealers()
drplDealerShipID.DataSource = GetDealers
drplDealerShipID.DataValueField = "DealerShipID"
drplDealerShipID.DataTextField = "DealerShipName"
drplDealerShipID.DataBind()
GetDealers.Close()
End Sub
********************************************************************************************************
But in the CreateUserWizard1_CreatedUser event I can't get the selected
value of the _drplDealers
*******************************************************************************************************
Protected Sub CreateUserWizard1_CreatedUser(ByVal sender As Object,
ByVal e As System.EventArgs) Handles CreateUserWizard1.CreatedUser
Dim drplDealerShipID As DropDownList = _
CType(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("_drplDealers"),
DropDownList)
Dim dealer As String
dealer = drplDealerShipID.SelectedValue.ToString
dealer = drplDealerShipID.SelectedValue.ToString
End Sub
********************************************************************************************************
I am not sure the way I am trying to acces the dropdown control that
was filled before in the page_load event is right but it doesnt' throw
any error but I always get nothing although if I have selected a value.
Am I missing some thing here?
Thanks
-L
We have a need to customize the CreateUserWizard and we put a
DropDownList control in there. And we are filling that DropDownControl
( _drplDealers) in the page_load event of the code behind page on which
the CreatUserWizard control is existing.
This my Page_load event thats filling the drop down and this works fine
I am getting the data.
*******************************************************************************************************
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
drplDealerShipID =
CType(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("_drplDealers"),
DropDownList)
Dim GetDealers As SqlDataReader = GetGroundingBL.GetDealers()
drplDealerShipID.DataSource = GetDealers
drplDealerShipID.DataValueField = "DealerShipID"
drplDealerShipID.DataTextField = "DealerShipName"
drplDealerShipID.DataBind()
GetDealers.Close()
End Sub
********************************************************************************************************
But in the CreateUserWizard1_CreatedUser event I can't get the selected
value of the _drplDealers
*******************************************************************************************************
Protected Sub CreateUserWizard1_CreatedUser(ByVal sender As Object,
ByVal e As System.EventArgs) Handles CreateUserWizard1.CreatedUser
Dim drplDealerShipID As DropDownList = _
CType(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("_drplDealers"),
DropDownList)
Dim dealer As String
dealer = drplDealerShipID.SelectedValue.ToString
dealer = drplDealerShipID.SelectedValue.ToString
End Sub
********************************************************************************************************
I am not sure the way I am trying to acces the dropdown control that
was filled before in the page_load event is right but it doesnt' throw
any error but I always get nothing although if I have selected a value.
Am I missing some thing here?
Thanks
-L