E
erik little
Hello all i am in need for someone to plase point out to me why my drop
down list do not rebind after the first databind,
Page loads fine, click on ddlA every thing loads fine in eaither ddlB or
ddlc, it's when i reclick or try to set some ~.visiable= false THEN
Can someone please tell me where i am going work or send me a url so
that i can read up on this issue..
Thank you,
Ahead of time,
.............code........................................
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")
'
ddlClothTapeColors.Visible = False
ddlBlindRemote.Visible = False
If Page.IsPostBack Then
If ddlClothTapeColors.Visible = True Then
ddlBlindRemote.Visible = False
Else
ddlBlindRemote.Visible = True
ddlClothTapeColors.Visible = False
End If
End If
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)
ddlClothTapeColors.Visible = True
GetTapeColors()
Case "Remote"
ddlMainOptions.SelectedItem.Value =
hdnIDA_Remote.Value
IDA_Remote = CInt(ddlMainOptions.SelectedItem.Value)
ddlBlindRemote.Visible = True
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
'
Private Sub GetTapeColors() ' ClothTape colors for Wood and
Alternitive Blinds
'
Try
IDProduct = CInt(hdnProductID.Value)
'
Dim ClothTapeColors As New
ConstructionSuperCenter.BCom_NS.Wood_and_Alternitive_Blinds_MAIN
'Get Fabric Colors For DDL
ddlClothTapeColors.DataSource =
ClothTapeColors.Get_Standard_Blind_Cloth_Tape_Colors_(IDProduct,
IDA_TapCor)
ddlClothTapeColors.ToolTip = "Please Choose a Cloth Color"
ddlClothTapeColors.DataTextField = "AttributeName"
ddlClothTapeColors.DataValueField = "AttributeName"
ddlClothTapeColors.DataBind()
Catch ex As Exception
System.Diagnostics.Debug.WriteLine(ex.Message & ": " &
ex.StackTrace)
End Try
End Sub
'
Private Sub GetRemote() 'Get Lets the consumer know if there is a
remote for this product
'
Try
IDProduct = CInt(hdnProductID.Value)
'
Dim BlindRemote As New
ConstructionSuperCenter.BCom_NS.Wood_and_Alternitive_Blinds_MAIN
'Get blind remote option for DDL
ddlBlindRemote.DataSource =
BlindRemote.Get_Standard_Blind_Remote_(IDProduct, IDA_Remote)
ddlBlindRemote.ToolTip = "Remote Option"
ddlBlindRemote.DataTextField = "AttributeName"
ddlBlindRemote.DataValueField = "AttributeName"
ddlBlindRemote.DataBind()
Catch ex As Exception
System.Diagnostics.Debug.WriteLine(ex.Message & ": " &
ex.StackTrace)
End Try
End Sub
'
End Class
...........................html.........................................
.....
<TABLE id="Table1" height="450" cellSpacing="1" cellPadding="1"
width="153" align="center"
border="0">
<TR>
<TD style="HEIGHT: 24px" align="center"><asp:dropdownlist
id="ddlMainOptions" AutoPostBack="True" runat="server">
<asp:ListItem Value="Extras">-- Extras -- </asp:ListItem>
<asp:ListItem Value="ClothTape">Cloth Tape </asp:ListItem>
<asp:ListItem Value="Remote">-- Remote --</asp:ListItem>
<asp:ListItem Value="Motorization">-- Motorization --</asp:ListItem>
<asp:ListItem Value="Routless ">-- Routless --</asp:ListItem>
</asp:dropdownlist></TD>
</TR>
<TR>
<TD style="HEIGHT: 1px" align="center"><asp
laceholder id="phExtras"
runat="server"></asp
laceholder></TD>
</TR>
<TR>
<TD style="HEIGHT: 71px"><asp:dropdownlist id="ddlClothTapeColors"
AutoPostBack="True" runat="server"
Height="40px"></asp:dropdownlist><asp:dropdownlist id="ddlBlindRemote"
runat="server" AutoPostBack="True"></asp:dropdownlist></TD>
</TR>
<TR>
<TD style="HEIGHT: 91px"><asp:datalist id="dlFabricTape"
runat="server" Height="168px" Width="8px">
<ItemTemplate>
<table>
<tr>
<td><img src='Images/Blinds/Comfortex_f/Fabric_Tape/<%#
DataBinder.Eval(Container.DataItem, "ProductImages") %>'
border="0"></td>
</tr>
</table>
</ItemTemplate>
<SelectedItemTemplate>
<table>
<tr>
<td><img src='Images/Blinds/Comfortex_f/Fabric_Tape/<%#
DataBinder.Eval(Container.DataItem, "ProductImages") %>'
border="0"></td>
</tr>
</table>
</SelectedItemTemplate>
</asp:datalist></TD>
</TR>
<TR>
<TD></TD>
</TR>
<TR>
<TD></TD>
</TR>
</TABLE>
<input id="hdnIDA_TapCor" name="hdnIDA_TapCor" runat="server"> <input
id="hdnProductID" name="hdnProductID" runat="server">
<input id="hdnIDA_Remote" name="hdnProductID" runat="server">
down list do not rebind after the first databind,
Page loads fine, click on ddlA every thing loads fine in eaither ddlB or
ddlc, it's when i reclick or try to set some ~.visiable= false THEN
Can someone please tell me where i am going work or send me a url so
that i can read up on this issue..
Thank you,
Ahead of time,
.............code........................................
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")
'
ddlClothTapeColors.Visible = False
ddlBlindRemote.Visible = False
If Page.IsPostBack Then
If ddlClothTapeColors.Visible = True Then
ddlBlindRemote.Visible = False
Else
ddlBlindRemote.Visible = True
ddlClothTapeColors.Visible = False
End If
End If
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)
ddlClothTapeColors.Visible = True
GetTapeColors()
Case "Remote"
ddlMainOptions.SelectedItem.Value =
hdnIDA_Remote.Value
IDA_Remote = CInt(ddlMainOptions.SelectedItem.Value)
ddlBlindRemote.Visible = True
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
'
Private Sub GetTapeColors() ' ClothTape colors for Wood and
Alternitive Blinds
'
Try
IDProduct = CInt(hdnProductID.Value)
'
Dim ClothTapeColors As New
ConstructionSuperCenter.BCom_NS.Wood_and_Alternitive_Blinds_MAIN
'Get Fabric Colors For DDL
ddlClothTapeColors.DataSource =
ClothTapeColors.Get_Standard_Blind_Cloth_Tape_Colors_(IDProduct,
IDA_TapCor)
ddlClothTapeColors.ToolTip = "Please Choose a Cloth Color"
ddlClothTapeColors.DataTextField = "AttributeName"
ddlClothTapeColors.DataValueField = "AttributeName"
ddlClothTapeColors.DataBind()
Catch ex As Exception
System.Diagnostics.Debug.WriteLine(ex.Message & ": " &
ex.StackTrace)
End Try
End Sub
'
Private Sub GetRemote() 'Get Lets the consumer know if there is a
remote for this product
'
Try
IDProduct = CInt(hdnProductID.Value)
'
Dim BlindRemote As New
ConstructionSuperCenter.BCom_NS.Wood_and_Alternitive_Blinds_MAIN
'Get blind remote option for DDL
ddlBlindRemote.DataSource =
BlindRemote.Get_Standard_Blind_Remote_(IDProduct, IDA_Remote)
ddlBlindRemote.ToolTip = "Remote Option"
ddlBlindRemote.DataTextField = "AttributeName"
ddlBlindRemote.DataValueField = "AttributeName"
ddlBlindRemote.DataBind()
Catch ex As Exception
System.Diagnostics.Debug.WriteLine(ex.Message & ": " &
ex.StackTrace)
End Try
End Sub
'
End Class
...........................html.........................................
.....
<TABLE id="Table1" height="450" cellSpacing="1" cellPadding="1"
width="153" align="center"
border="0">
<TR>
<TD style="HEIGHT: 24px" align="center"><asp:dropdownlist
id="ddlMainOptions" AutoPostBack="True" runat="server">
<asp:ListItem Value="Extras">-- Extras -- </asp:ListItem>
<asp:ListItem Value="ClothTape">Cloth Tape </asp:ListItem>
<asp:ListItem Value="Remote">-- Remote --</asp:ListItem>
<asp:ListItem Value="Motorization">-- Motorization --</asp:ListItem>
<asp:ListItem Value="Routless ">-- Routless --</asp:ListItem>
</asp:dropdownlist></TD>
</TR>
<TR>
<TD style="HEIGHT: 1px" align="center"><asp
runat="server"></asp
</TR>
<TR>
<TD style="HEIGHT: 71px"><asp:dropdownlist id="ddlClothTapeColors"
AutoPostBack="True" runat="server"
Height="40px"></asp:dropdownlist><asp:dropdownlist id="ddlBlindRemote"
runat="server" AutoPostBack="True"></asp:dropdownlist></TD>
</TR>
<TR>
<TD style="HEIGHT: 91px"><asp:datalist id="dlFabricTape"
runat="server" Height="168px" Width="8px">
<ItemTemplate>
<table>
<tr>
<td><img src='Images/Blinds/Comfortex_f/Fabric_Tape/<%#
DataBinder.Eval(Container.DataItem, "ProductImages") %>'
border="0"></td>
</tr>
</table>
</ItemTemplate>
<SelectedItemTemplate>
<table>
<tr>
<td><img src='Images/Blinds/Comfortex_f/Fabric_Tape/<%#
DataBinder.Eval(Container.DataItem, "ProductImages") %>'
border="0"></td>
</tr>
</table>
</SelectedItemTemplate>
</asp:datalist></TD>
</TR>
<TR>
<TD></TD>
</TR>
<TR>
<TD></TD>
</TR>
</TABLE>
<input id="hdnIDA_TapCor" name="hdnIDA_TapCor" runat="server"> <input
id="hdnProductID" name="hdnProductID" runat="server">
<input id="hdnIDA_Remote" name="hdnProductID" runat="server">