Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
05-09-2012, 06:15 PM #1
- Join Date
- May 2012
- Thanked 0 Times in 0 Posts
Doing 4 .aspx tasks, in one .aspx. Final. help!
The part I need help with start at 1:08.
This is for my final. I am completely stumped on how to go about this... I only know how to make separate .aspx files with separate links. Can anyone give me some help on how to essentially "merge" them to do 4 things without the user clicking anything?
UPDATE: This table of data is what I need to work off of.
EmpName EmpGender Salary
Ginny F $100,000.00
Carl M $90,000.00
Chrissy F $90,000.00
Rose F $45,000.00
Joe M $30,000.00
Last edited by oddish; 05-09-2012 at 07:06 PM.
05-09-2012, 09:38 PM #2
You could also do it with AJAX. But I think that violates the spirit of the "one single page" that your instructor wants.
If you haven't yet created an ASP.NET page (one single page) that can react to any one of several button clicks, then it's time to get started creating one, ASAP. (It's really trivial...If you use Visual Studio it will lead you by the hand and help you do it.)Be yourself. No one else is as qualified.
05-10-2012, 12:28 PM #3
i think the automating it is really stupid-
I would make it 'the easy way' which would be to have a grid that onload populates from your database...
then essentially have 3 buttons
Button1: Add new record
Button2: Update a record
Button3: Delete a record
let them act as normal <asp:Button/>'s- they will do a postback of the page and if you have your page load correct for the grid it will populate accordingly...
there didn't seem to be any real 'guidelines' so you could 'cheat' as well (I say cheat but if you know how to do it then you are past the basic concepts that he is trying to drive)....
since he is "not going to touch the keyboard again" don't ever do a postback...
create three global datatables
onpageload initialize each one of them to your fist call... in two of them add a record, and in one of those two change a record (you now have all the 'views' you will need). bind each of those to a differend gridview and have each grid be in a seperate div... onpageload divA is display:block, others are display:none;.... then step through a timer and essentially change the displays of each one- you will never have a post back
you will be proving that you get those concepts bc you have gone past what point he is trying to drive- my opinion anyways.... and based on his requirements that is acceptable (but that could all change pending the rules/regulations)....
I think though that the most important point is to make sure you have key concepts down...
the first and obvious is that you know how to get/pass data to a database... that is the entire point of that exercise. Selecting data, inserting data, updating data, deleting data
I would practice by making a ton of different event listeners... do keyup event checks, do time loops that check variables in the DOM and if they are met do something- fire postbacks, fire redirects, fire asp functions, etc.... coding is all practice practice practice... I think the key here is not so much prepping for the final in the sense he told you what it 'was going to be' but prepping for the final so that you understand the concepts that they are driving.
*just my opinion
05-10-2012, 09:46 PM #4
Heh...but since Thursday is today, I suspect your advice (and even mine) is likely too late for him, Alykins.
But I'm glad to see you agree with my suggest methodology. Essentially, do it as you would a manual page and only use the JS to automatically push the buttons.Be yourself. No one else is as qualified.