OK, You need to relax, and give me a step by step approach to how your application is to work. What will the user be doing? Provide the sequence of events... i.e. 1. user logins in, 2. user clicks main menu, etc. Remember!!! I am not working on your application, so I do not know its functionality. Provide code where applicable as well..
Saying that, here is some information you may find useful.
1. From what you have said, the second webform is not being populated with the updated data. Requiring the REFRESH to be initiated. There is a reason for this: ASP.Net "caches" the server requests, so unless you call that request to the server again (implicitly) you will not get the updated cache. This is the whole principle of the .net environment, inorder to reduce calls to the DB/server. The Page_Load event only gets called on an initial load (first time to the page) or a Refresh (F5), never in a back/forward button control on the browser (that is the cached page).
2. You can get around this by how you code your application. It sounds like you have your code for specific actions in the wrong spot, or not called at the appropriate time. You have to consider logic when programming, and evaluate the functionality you want to provide and code based on variations from that. Remember, your user will never do what you expect them to.
3. The code in your Page_Load event should probably exist as a seperate function that you can call as needed. But without seeing the code first hand, I can only guess. Logic of your code!
I hope this helps in some way, I will check back regularily to see if you reply, as you sound stressed and I would like to help you out on this.
Good luck!
Hello there!
This is my firts post, and I'm happy of finding a site like this.
I have a little trouble with .net. I'm programming a site (i mean webforms) and something very weird happens.
If I have two webforms, both of them connects to a DB and they use the info from that DB to fill some combos and listboxes...
Imagine that I have a webform to register clients and another one to register client's type.
So, if a get to client's type and register, there's a listbox on the top of the webform that has to be reloaded. I can do a trick there and clear the listbox and make a sql statement to fill it again with the new info.
In fact, the Page_load procedure does the same thing when the webform starts. (I mean fills the listbox with the info registered already)
The problem comes when I use the other webform, I do something and return the webform I was using before. The info in the listbox is OLD. I tried to debbug there and... what was my surprisse???? The webform skips the Page_Load procedure!!! (At least if I don't type the F5 key to reload)
I REALLY NEED THAT THIS THING DOESN'T HAPPEN... because the users that are going to use this, don't know F5 key.
I friend said that I must enable the sesion state and the view state for this...
What do you suggest... I REALLY NEED HELP