[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[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!

6.3

How do I hide fields on a web page based upon which radio button is selected?

Asked by pamh_cfcausa in Programming for ASP.NET, C# Programming Language

Tags: Microsoft, ASP.Net C#, 2.0, Hide fields on a web page based upon a radio button

I am working on a new page written in C# in ASP.Net, using Master Pages.  On my new page, I have a user control that contains a second user control  (WriteTo) with several fields in it.  On the first user control, there are two radio buttons.  If the first radio button is selected, the WriteTo user control is supposed to be hidden.  if the second radio button is selected, the WriteTo user control is supposed to be visible.
When the page loads, the WriteTo user control is hidden properly through the Page_Load.  However, the event OnSelectedIndexChanged never seems to fire, and the WriteTo user control never becomes visible.  How do I get the event to fire properly, or is there another problem?
thanks.
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:
// in the ascx page on the first user control
<td><asp:radiobuttonlist id="rdoWrite" runat="server" OnSelectedIndexChanged="Index_Changed">
                    <asp:listitem selected="true" value="Me" />
                    <asp:listitem value="Another person" />
                </asp:radiobuttonlist>
</td>
 
// in the code behind
 protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.ShowAddress(0);
               
            }
        }
 void Index_Changed(Object sender, EventArgs e) 
    {
        int nIndicator = this.rdoWrite.SelectedIndex;
        ShowAddress(nIndicator);
    }
 
 protected void ShowAddress(int pnIndicator)
        {
            if (pnIndicator > 0)
            {
                this.WriteTo.Visible = true;
            }
            else if (pnIndicator == 0)
            {
                this.WriteTo.Visible = false;
            }
            
        }
 
Related Solutions
Keywords: How do I hide fields on a web page ba…
 
Loading Advertisement...
 
[+][-]04/16/08 03:03 PM, ID: 21372420Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]04/16/08 03:09 PM, ID: 21372460Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]04/16/08 03:09 PM, ID: 21372465Accepted Solution

View this solution now by starting your 30-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: Programming for ASP.NET, C# Programming Language
Tags: Microsoft, ASP.Net C#, 2.0, Hide fields on a web page based upon a radio button
Sign Up Now!
Solution Provided By: amanola
Participating Experts: 4
Solution Grade: B
 
[+][-]04/16/08 03:19 PM, ID: 21372538Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04/17/08 02:13 AM, ID: 21375347Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04/17/08 02:16 PM, ID: 21381436Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/17/08 02:19 PM, ID: 21381462Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]04/17/08 02:35 PM, ID: 21381588Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/17/08 02:40 PM, ID: 21381640Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]04/17/08 02:42 PM, ID: 21381650Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/17/08 02:44 PM, ID: 21381669Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]04/17/08 02:46 PM, ID: 21381687Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/17/08 02:48 PM, ID: 21381696Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/17/08 02:53 PM, ID: 21381740Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]04/17/08 02:56 PM, ID: 21381762Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]04/17/08 03:10 PM, ID: 21381862Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/17/08 03:22 PM, ID: 21381942Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]04/17/08 03:24 PM, ID: 21381950Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04/17/08 04:50 PM, ID: 21382353Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
 
Loading Advertisement...
20091021-EE-VQP-81 / EE_QW_2_20070628