• 0

C# Panel Control


Question

I'm basically trying to learn C# by writing some simple asp.net pages. Im writing a simple poll that writes to text files. After you click the submit button i want the radio buttons to go away and display the results. How would i do that; i read about panels and visibility but they are kind of confusing. I have no idea how to do panels, and if i do visiblity, its very easy to fo refresh counting.

the url is here: Poll.aspx

Any help would be appriciated, Thanks,

hava

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
I'm basically trying to learn C# by writing some simple asp.net pages.  Im writing a simple poll that writes to text files.  After you click the submit button i want the radio buttons to go away and display the results.  How would i do that; i read about panels and visibility but they are kind of confusing.  I have no idea how to do panels, and if i do visiblity, its very easy to fo refresh counting.

the url is here: Poll.aspx

Any help would be appriciated, Thanks,

hava

Put this before the html code to show the radio buttons and submit button

<asp:Panel id="pnlPoll" runat="server">

And this after it

</asp:Panel>

Put this before the HTML to display the results:

<asp:Panel id="pnlResults" runat="server" Visible="false">

And this after it

</asp:Panel]>

THen, on your button's CLick event handler, do:

pnlPoll.Visible = false;
pnlResults.Visible = true;

That's a very basic way to do it, but it works.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.