Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 31st, 2005, 04:32 PM
Registered User
 
Join Date: Jul 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to erikkl2000
Default 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








Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Drop downs - 2 col socoolbrewster CSS Cascading Style Sheets 5 December 22nd, 2007 05:32 AM
dealing with drop downs lisabb ASP.NET 2.0 Basics 5 May 28th, 2007 12:29 AM
dependent drop downs p2pMember ASP.NET 1.0 and 1.1 Professional 0 July 19th, 2006 05:25 AM
Drop downs for choosing # of pages gilgalbiblewheel Classic ASP Databases 3 October 21st, 2004 03:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.