Saturday, March 24, 2012

Working with Panels

I have a web form consisting of many panels and objects. When I hit the "submit" button I would like all these objects visible property to change to "False" so that I can bring up another panel. What would be the easiest way to accomplish this without having to declare each object as visible=false?

Also, I have posted another related question concerning web form creation and was persuaded to handle all the user interaction from one page. How do I hide all the panels I created for one page so that I could work on another panel set in design view without the clutter?

I really appreciate all the assistance I have gotten from this forum. Its been an invaluable resource to me.Hi,

It might be possible to call the whole page visible="false" and then call what you need displayed as visible="true". Not to sure about that.

Next,
Are you talking about the page where the actual panels show, the HTML page, or the code-behind page?

It sounds like you are talking about the actual page where the panels exists.
Why are you spending so much time on this page?

If you mean the code-behind page, you could always use Regions.
They format the page so you don't have to look at everything at once.

Hope this helps,
fathrDave
I tried setting the page.visible value to false and then setting a true value to the panels I wanted to show but I just received a blank page. Any ideas?

I am new to Studio.Net and have been accustomed to designing web pages through design views. When I started this project I created an ASP.NET Web Application and began adding components to my form from the design view of the .aspx form. It is much easier for me to grasp the component's relationships graphically so I can provide a more visually rich environment.

I figured it would be easier to create multiple web pages with all the user values linked, but, was persuaded to design my form with panels and make them visible as needed to create the illusion of multiple pages. I guess I am missing a very easy solution to what I want to have happen.

1- I want to have a registration page where users enter their personal info.
2- Upon hitting the "Submit" button, I want a confirmation page to appear
3- Once the user hits "Yes" to confirm the information they entered, I want to package the info up and send it to an email address.

This has to be easy, every web site I go to follows this kind of format.

I have nearly every ASP.NET book I could lay my hands on and still can't see the solution to this very simply web-app. Please walk me through how you would accomplish this. Thanks for all you help.
How about using javascript.
When the user hits submit a confirmation window appears.


<asp:button id="button1" onClick="Javaevent()">

then


<script type="text/javascript">
Javaevent(){
var name = confirm("Press a button")
if (name == true)
{
'call a procedure to email the data and redirect to new screen
}
else
{
'redirect back to page to correct data
}}
</script>

Sorry the javacode isn't perfect, but I think the idea may help.

fathrDave

0 comments:

Post a Comment