Hi
I have one label for question, radiobuttonlist for their answers, next button to move next question & previous button. I am displaying one question per page after clicking next button next question appears, but when i click previous button previous question appears.
But i want previous question with earlier selected answer when i click to previous button.
Asp.net c# Thank you.
Either store and load Question and answer values in the session.
or have one page with a multiview and swich views when navigating between 'pages' this way the viewstate information will be preserved.
You can use asp.net wizard too...
Wizard Class
Wizard Web Server Control Overview
Walkthrough: Advanced Use of the ASP.NET Wizard Control
Related
I might know it's not that easy but wanted to ask!
Assuming I have asp.net long form divided to 3 bootstrap tabs and only few fields within the first and last tab have asp.net validations. The save button is out of the tabs content area and could be clicked anytime and when that happen while a specific tab content displayed, the user will not realize the fired validator in another.
Is there a way to jump to that tab and maybe could be advanced if focused on the field? is there other tab technique solution that could be helpful or the problem is with the default ASP.NET field validators?
i have worked with bootstrap wizard, i was using the following code for moving to next or previous tab after submitting data..
for moving next tab
$('#form_wizard').bootstrapWizard('next');
for moving previous
$('#form_wizard').bootstrapWizard('previous');
have a look here
I have a '.aspx' Web Form with Gridview,
and if I press the UP/Down arrow key focus should be on Gridview and the Highlight should move to the next row.
Is there any solution for it ?
Yes that is possible without any third party control. What you need to do is to apply sound logic for this. Check below link for your solution where answer has been posted and marked it as an answer.
gridview to allow keyboard commands
I want to display a very long description data retrieved from the database using asp .net. That Description should be displayed in Page Wise and all the details wouldn't be seen in a single page. When user clicks on "Next Page" , that page will show the next details and so on towards the end of the total text/description.
Is there any such control where we can show this type?
Please answer me.
If you are showing data in a gridview, then select gridview of design page, go to solution explorer and make a change in AllowPaging from no to yes.
I have created online exam application (web based) in asp.net c#. In my application first form includes dropdownlist for tests & start button. When i select particular test from dropdownlist & after clicking to start button it goes to the next page. It includes one label for question, radiobuttonlist for answers, next & previous button.In first form in the click event of start button i have created non repeated random values ( for question ids) i.e stored in array.when it redirects to another page then 1st question from that array will display with answers & after clicking next button next question will appear, here i have inserted selected values(answers selected in radiobuttonlist) by user in database to calculate score. Problem is with previous button, when i click to previous button then it goes to previous button but i want earlier selected values by user to be bind with that radiobuttonlist. how i can do this?
I think you are storing the previous question answer in your database or somewhere else.
Then in the page_load event check the database with the question number and if the records available then display the user selection accordingly by fetching them from the database.
This question already has answers here:
Best way to detect when a user leaves a web page?
(10 answers)
Closed 3 years ago.
What is the best way to detect if a user leaves a web page without first saving?
I have searched before I posted this question, but I haven't found related topics to deal with ASP.NET (I have controls DropDownList, ListBox, TextBox....)
I would use the JQuery serialize method to save off the form's state in the page's OnLoad event. Then serialize the page again in the OnBeforeUnload event. If the values are different, then the page has changed. You'll have to add a flag to know whether or not the page is unloading because the "Save" button is being clicked. If the values are different and the user didn't click "Save", then display the "Do you want to save before leaving?" box.
One very simple way is to do it the StackOverflow way:
http://www.jonstjohn.com/node/23
Basically it boils down to setting a method to be called in the onbeforeunload javascript event.