I am having issues with maintaining info when person uses browser back button. I work for a company which is an online traffic school course. The issues I am having is say a student starts on lesson 1. Within lesson 1 there are 10 pages of content that they must read and click Next button to go to next page. Once they then have read all 10 pages, then they go to a quiz where they are given one question at a time (there are 5 questions). They click Next button to move to each question. Once they have answered all questions, then they go to a grade page. If they passed, then they click on continue button to go to lesson 2. Then onto quiz for lesson 2. This part all works great and if they click our programmed Back buttons everything works great as well. The problem is if they go from say lesson 1 all the way to lesson 3 (just an example) and they decide to use the browser's back button to go all the way back to lesson 1, everything tends to get messed up. Since we are driving off of class Student which contains current lesson num, current page num, current question num, once we advance further in the course these values get updated. My problem is that when the student continuously clicks the browser's back button the lesson num, page num and question num (and other content) does not follow suit to what it was. I am not sure why, but the pages are not being cached. Is there anyway to maintain the lesson num, page num and question num as the student clicks browser back button? Meaning as they click back to quiz from lesson 2, it shows lesson 2 (it is currently showing lesson 3 since that is how far have advanced) and same with the lesson pages that they must read. I have tried to use hidden input, but it does not seem to work correctly all the time. Any ideas???
I am not sure that I quite follow you. The students cannot move to next lesson with out moving through all of the pages of the lesson content and passing the quiz. So they do move forward in a linear manner. The problem is if they go all the way through lesson 1, pass lesson 1 quiz, now they go to lesson 2. If they now click the browsers back button all the way back to lesson 1 quiz question 1, that is where I seem to notice the problem. It shows lesson 2 quiz question 1. I would have thought that all the previous pages would be cached as the student clicks browser back button since it is only client side and is not going back to the server to retrieve any info. But for some reason it is not caching all of the pages. Is there a limit to the number of pages that will be cached?
You place a catch function in the page.load event of every page, that validates if that lesson was completed, and if so, it redirects them back to the lesson menu or a sorry page, then another redirect to the lesson menu.
You have to think 2 ways, one using your back and forward buttons, and one using the browsers back and forward buttons.
So you add some extra code for every lesson page, that first validates access to the page using the browser buttons.
Saving Page Number, Lesson Number data
You can save that in the session, but if they leave and come back, then the session number has to match, if they clear there browser cache, then the session is gone. The cache last as long as the browser will store it, or reaches it's storage limit, or until it's erased.
In my opinion, each page has to be independent in operation, in other words, the page has to be able to remember or fetch the data needed to pick up where it left off, without dependence of the previous page.
So overall I'm saying that it can't be fixed with something easy as remembering data in the session or querystring, it's at the program design level, in which each time an action occurs, it should update the table, and you check the table to figure out what level and lesson they are on.
Notice that there is a # (hash) symbol in the URL. The problem I'm having is that I have a 3rd party Grid on that page which is not operating correctly. If I manually change the URL to remove the # symbol, then the grid works perfectly.
Anybody know why this # symbol is showing up in my URL ? How can I get rid of it ?
I am using below bat file which should return output text as URLs which are NOT browsable(eg. page not found error) but it is actually returning all successful ping in output text.Please help me to modify my bat file:-
Of course not, that is not what ping is designed for. If you want to check individual web pages then you will have to write a program that sends and receives HTTP messages. Try a search of the articles section[^] for some examples.
Using Visual Studio 2012 Ultimate on Windows 8 64 bit Virtual Machine
Using Oracle Database 184.108.40.206 Enterprise Edition
I want to develop a web page with a gridview on it which will be populated with Oracle database's 4 tables having all features like add, delete and edit the rows without pressing update/cancle link buttons which I found on my google links. Gridview must have radio button, dropdownlist, textboxes, checkboxes and datatime control with it. The control's values are to be populated from different tables join on a common column customer_id number(5).
I am not going to request you to provide me the complete code (like spoon feed), but if anyone can share with me link(s) for it, I shall be thankful to you, in which different controls are being populated from different tables and that grid view should be available for update without any click on further link/button etc.
How it should function :
Suppose below is Grid view looks:
Registered On (DateandTime Control)
Status (Radio Button)
Customer_Id from all 4 tables.
Registered On from Reg_Master table
Active from Customer_Active table (customer_id, status number(1)); If status = 1 then it is active, else inactive)
Country from country_master table (customer_id,country_name)
Phone from cust_phone table (customer_id,phone_no)
Services from service_list table (customer_id,service_code) [Dynamic, i.e. 1 to 20 services are there] and parent table service_master table (service_code, service_name)
Now, if user changes status as inactive to active or vice versa, so its effect should only be in customer_active table. If user changes country from country1 to country4 and check/uncheck on its existing service, then its impact should be on country_master and service_list table only.
I am not sure, how good and clear I am asking the question, but if still I am unclear in my request, please let me know.
Hi Girish - thank you for your email, but I don't have the capacity to implement this for you. However, if you change the dbconnection string and the dbprovider in the ConnectionString section of the web.config, you should be able to get the existing code working for you. If not, there are plenty of samples on CodeProject.
I am in the process of developing a company intranet. The intranet would be driven by different departments, which is set up as folders in the website project, like Marketing, Finance etc. This is developed in VS 2010 using C#.
The WSAT from VS works great, i can see the different folders and able to set up roles with access to certain folders.
Now, I deployed this website onto Windows 2008 server running IIS 7.
Having rough time with trying to set up the WSAT tool for this intranet.
1. I copied over WSAT project from my laptop, C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ASP.NETWebAdminFiles over to the windows server running IIS 7.0. I copied over to \\\C:\inetpub\wwwroot\ASP.NETWebAdminFiles.
2. Set up an application pointing to this path.
3. Copied over my website to same server on D drive of windows server \inetpub\WebDev-Intranet. I set this up as a new website on IIS 7.0. This site is running fine.
4. How do I link the WSAT tool to this website on IIS 7.0?
My short research, 5 minutes says the WSAT just modifies the web.config.xml file in your project, so all you need to do is copy that file to the folder your project is in on the server.
You may need to modify some paths in the file.
I recommend that you learn how to use the IIS7 admin tool instead of hacking the visual studio program, or simply install visual stdio on the server. There are You Tube videos that show how to use the IIS7 admin tool that you can watch and learn from.
I don't know what all the negatives are for installing VS on the server, so perhaps someone else can comment on it.