Advertisement

09.19.2008 at 03:54PM PDT, ID: 23747580
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.0

UpdatePanel - triggers, Panel

Asked by shmoel in .NET, Programming for ASP.NET, Visual Studio

Tags:

I am  using a Panel as pop-up screen off of  the main page.
My Panel has a prepopulated (on Page_Load)  DropDownList. The onChange event of  DropDownList gets ListBox populated with list of items from DB.

How do I coordinate my UpdatePanels and triggers to make this to work.
The problem is when I select an Item from my DropDownList , my "pop-up" Panel goes away in the result of refreshing the whole thing.

Here is what I 've got
Thank you in advance.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
<script type="text/javascript">
    var styleToSelect;
    function onOk() {
    document.getElementById('Paragraph1').className = styleToSelect;
    }
    </script>
 
    <form id="form2" runat="server">
    <asp:ScriptManager ID="ScriptManager2" runat="server">
    </asp:ScriptManager>
    <br />
    <asp:LinkButton ID="LinkButton2" runat="server">Please click to select an alternate text style.</asp:LinkButton><br />
    <div>
        <p id="P1">
        </p>
        <asp:Panel ID="Panel2" runat="server" CssClass="modalPopup" Style="display: none"
            Width="750px" Height="600px">
            <asp:UpdatePanel ID="UpdatePanel6" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
                <ContentTemplate>
                    <div runat="server" id="div1" style="margin: 0px auto; width: 700px;">
                        <table width="750" border="0" cellspacing="2" cellpadding="5" style="border: 1px dotted #ccc;
                            margin: 0 auto">
                            <tr>
                                <td width="320" style="font-weight: bold;">
                                    Select a Deduction Type
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal">
                                        <asp:ListItem Enabled="true" Text="One Time" Value="0">One </asp:ListItem>
                                        <asp:ListItem Enabled="true" Text="Bi-weekly" Value="1">Two</asp:ListItem>
                                        <asp:ListItem Enabled="true" Text="Cash / Check / other" Value="2">Three</asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                            </tr>
                        </table>
                        <table style="border: 0px dashed #000; width: 99%;">
                            <%--  dropdown--%>
                            <tr>
                                <td style="width: 100%; height: 30px; border: 1px dotted #ccc">
                                    <div>
                                        <asp:DropDownList ID="DropDownList1" DataTextField="EntityName" DataValueField="EntityUID"
                                            runat="server" Width="300" Height="20px" AutoPostBack="True" Font-Bold="true">
                                        </asp:DropDownList>
                                    </div>
                                </td>
                            </tr>
                            <%-- end dropdown--%>
                            <%--  list box--%>
                            <asp:UpdatePanel ID="UpdatePanel7" runat="server" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <tr class="StepOneTableRow">
                                        <td align="center" class="StepOneTableCell">
                                            <asp:ListBox ID="ListBox1" runat="server" Width="310" Height="330" DataValueField="ce_CharitableEntityUID"
                                                DataTextField="ce_CharitableEntityName" AutoPostBack="true">
                                                <asp:ListItem></asp:ListItem>
                                            </asp:ListBox>
                                        </td>
                                        <td width="100" class="StepOneTableCell">
                                            <asp:Button ID="Button1" runat="server" Text="+" Width="30px" OnClientClick="" />
                                            <br />
                                            <asp:Button ID="Button2" runat="server" Text="-" Width="30px" />
                                        </td>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                            <%-- end  list box--%>
                            </td> </tr>
                        </table>
                        <br />
                        <br />
                    </div>
                    <asp:UpdatePanel ID="UpdatePanel8" runat="server">
                        <Triggers>
                            <asp:PostBackTrigger ControlID="OkButton" />
                            <asp:PostBackTrigger ControlID="CancelButton" />
                        </Triggers>
                    </asp:UpdatePanel>
                    <asp:UpdatePanel ID="UpdatePanel9" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">
                        <Triggers>
                            <asp:PostBackTrigger ControlID="ddlFederation" />
                            <asp:PostBackTrigger ControlID="lbCharityList" />
                        </Triggers>
                    </asp:UpdatePanel>
                    <div align="center">
                        <asp:Button ID="Button3" runat="server" Text="OK" CausesValidation="true" />
                        <asp:Button ID="Button4" runat="server" Text="Cancel" CausesValidation="false" />
                    </div>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </asp:Panel>
        <br />
        <asp:UpdatePanel ID="UpdatePanel10" runat="server">
            <Triggers>
                <asp:PostBackTrigger ControlID="lbCharityList" />
            </Triggers>
        </asp:UpdatePanel>
        <cc1:ModalPopupExtender ID="ModalPopupExtender2" runat="server" TargetControlID="LinkButton1"
            PopupControlID="Panel1" BackgroundCssClass="modalBackground" DropShadow="true"
            OkControlID="OkButton" OnOkScript="onOk()" CancelControlID="CancelButton" />
    </div>
    </form>
[+][-]09.20.2008 at 12:06AM PDT, ID: 22528581

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET, Programming for ASP.NET, Visual Studio
Tags: .net, Visual Studio 2008, Web Development, Visual Basic
Sign Up Now!
Solution Provided By: NazoUK
Participating Experts: 1
Solution Grade: B
 
 
[+][-]09.22.2008 at 07:15AM PDT, ID: 22540171

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628