Secect case cand drop downs
Hello all,
I am in need to find solution to this 4 day deliman. I AM a 8 month old asp.net 1.1 man. And just now starting to really understand what i am doing.
Please,, any help at all is great. Even a url with an explation would be fabilous.
Here is what i have:
I have a ddlA that has static items and values, i have a ddlB the loads after the user makes a selection from the ddlA, i have a ddlc that loads from the user selection from ddlA. only ddlB, or ddlC can be visiable at one time.
When the page loads and i make a selection from ddlA ddlb loads perfectly; however, when i make another selection from ddla neither ddlB or ddlc will load,,, i am sure that this is a databind issue...
I HAVE looked unsuccessfully for information about what i am implementing and have had no lu\ck....
SOS FELLOWS!!
***Long story shory might tell me that i am not rebinding...
================================================== =
Option Strict On
Public Class Wood_Blind_Extras_Main
Inherits System.Web.UI.UserControl
Dim IDA_TapCor As Int32
Dim IDProduct As Int32
Dim IDA_Remote As Int32
'
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'
hdnProductID.Value = Request.QueryString("IDProduct")
hdnIDA_TapCor.Value = Request.QueryString("IDA_TapCor")
hdnIDA_Remote.Value = Request.QueryString("IDA_Remote")
'
End Sub
'
'...
Private Sub ddlMainOptions_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ddlMainOptions.SelectedIndexChanged
'
'...
Try
'
Select Case ddlMainOptions.SelectedItem.Value
'
Case "ClothTape"
ddlMainOptions.SelectedItem.Value = hdnIDA_TapCor.Value
IDA_TapCor = CInt(ddlMainOptions.SelectedItem.Value)
GetTapeColors()
Case "Remote"
ddlMainOptions.SelectedItem.Value = hdnIDA_Remote.Value
IDA_Remote = CInt(ddlMainOptions.SelectedItem.Value)
GetRemote()
Case "Motorization"
ddlMainOptions.SelectedItem.Value = ""
Case "Routless"
ddlMainOptions.SelectedItem.Value = ""
Case "Extras"
Case Else
End Select
'
Catch ex As Exception
System.Diagnostics.Debug.WriteLine(ex.Message & ": " & ex.StackTrace)
End Try
End Sub
'
Sub GetTapeColors()
'
Try
IDProduct = CInt(hdnProductID.Value)
'
Dim FabricColors As New ConstructionSuperCenter.BCom_NS.Wood_and_Alterniti ve_Blinds_MAIN
'Get Fabric Colors For DDL
ddlClothTapeColors.DataSource = FabricColors.Get_Standard_Blind_Cloth_Tape_Colors_ (IDProduct, IDA_TapCor)
ddlClothTapeColors.ToolTip = "Please Choose a Cloth Color"
ddlClothTapeColors.DataTextField = "AttributeName"
ddlClothTapeColors.DataValueField = "AttributeName"
ddlClothTapeColors.Visible = True
ddlClothTapeColors.DataBind()
'
' 'Place holder
If ddlClothTapeColors.Items.Count > 0 Then
phExtras.Controls.Add(ddlClothTapeColors)
Else
ddlClothTapeColors.Visible = False
End If
Catch ex As Exception
System.Diagnostics.Debug.WriteLine(ex.Message & ": " & ex.StackTrace)
End Try
End Sub
'
Sub GetRemote() 'Get Lets the consumer know if there is a reamote for this product
'
Try
IDProduct = CInt(hdnProductID.Value)
'
Dim BlindRemote As New ConstructionSuperCenter.BCom_NS.Wood_and_Alterniti ve_Blinds_MAIN
'Get Fabric Colors For DDL
ddlBlindRemote.DataSource = BlindRemote.Get_Standard_Blind_Remote_(IDProduct, IDA_Remote)
ddlBlindRemote.ToolTip = "Remote Option"
ddlBlindRemote.DataTextField = "AttributeName"
ddlBlindRemote.DataValueField = "AttributeName"
ddlBlindRemote.Visible = True
ddlBlindRemote.DataBind()
'
' 'Place holder
If ddlBlindRemote.Items.Count > 0 Then
phExtras.Controls.Add(ddlBlindRemote)
Else
ddlClothTapeColors.Visible = False
End If
Catch ex As Exception
System.Diagnostics.Debug.WriteLine(ex.Message & ": " & ex.StackTrace)
End Try
End Sub
End Class
|