Pretty Spooky....

K

Kivak Wolf

Hey,

Curiousity question for you all. It works, no problem, but I'm gunna
add code so that it does not break anyway.

I have a web page done in ASP 1.1 and the "default.aspx" page have
about 3 or so panels. I have a datagrid and some add, edit, and delete
functions inside of it. Now, each panel is created for an add, edit, or
delete function. In each is a "Cancel" button - just in case =D. Now,
in the beginning, the program hides the function panels and shows the
main panel with the datagrid. When the user clicks "edit" or some other
function, that panel is shown and all the others are hidden. Now, on
to the question. I created the "Cancel" buttons and named them
"butCancel" with the text "Cancel". WITHOUT ANY CODE written by me, it
will hide the correct panels and show the main panel. It works perfect
for a cancel button, but I didn't use any code, I just put it in there.
Whats going on? I will say that when I make new code for it, it does
what the new code says. And there are no other buttons on that web page
called "butCancel" so it is not that either. I just wanna know what it
is doing. =/

Thanks,
Kivak
 
G

Guest

I think you may have answered your own question:
"in the beginning, the program hides the function panels and shows the
main panel with the datagrid"

It sounds like your Cancel button is just doing a PostBack, and without any
specific instructions on how to handle it, it just acts like the page was
brand new. Once you write code to respond to that button-click, it will run
that code instead of the 'default' code when the page re-loads. (Or it will
run it in addition to the page_load code, I should say...results will vary
depending on exactly what your code says.)

You could probably get a more accurate, technical answer, if you provided
sample code, but I suspect this is at the the gist of what is going on...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top