|
thanks u very much..
Your and my coding style is same..
i did the same thing..
but do u know what is the disadvantage of paging in grid view control..
Once u click on second page it wil display the same page..
to show that data you need to retrieve the same data again..
coz gridview never maintain the history..
to see the next page you need to call the same procedure..
|
|
|
|
|
Dear All,
The issue is that users are insisting to close the application from the x button in the upper right corner of the browser or by pressing ALT + F4. But i want users to log off using a loggoff button in the application, because i want to remove the sessions created. I tried to put some code in Application_End, but it is not executing the code when users close the application usinf ALTF4 or x-button.
I have searched for an event onclosing but it doesnt exist as i saw.
Any ideas please...
Thanks in advance
|
|
|
|
|
samerh wrote: I tried to put some code in Application_End, but it is not executing the code when users close the application usinf ALTF4 or x-button.
ApplicationEnd runs after all Sessions have ended. An ASP.NET application runs for multiple users remember.
Use SessionEnd instead, however, it won't run immediately because it will take some time for the server to time out the session. That timeout is set in the web.config.
You cannot automatically detect when a user closes the browser so you are going to have to work around that limitation. Remember that an ASP.NET application is stateless. Things like viewstate and Session variables give the illusion of state only.
|
|
|
|
|
Unfortuantly, web browsers don't give you that kind of control for security reasons, and the Application_End event is not fired when a user closes their browser. It is fired with the appPool is recycled or shutdown. Some alternatives include:
1) a client timer that warns the user when they're about to be logged off by opening a popup window. If the user doesn't respond, or they confirm they want to log out then it submits the logout info to the server.
2) if you are using HttpSessionState then you can set the timeout and use the Session_End event to cleanup.
Hope this helps
|
|
|
|
|
Hello friends,
I don't know why I have memory leak (on client browser, not the server) at each postback, even on pages that don't use any javascripts or 3rd party RAD controls (which often use leaky javascript!). Does anyone know why this happens?
Nila
|
|
|
|
|
Sounds like the viewstate is getting bigger and bigger. Try disabling the viewstate altogether, perform a few postbacks and see what happens to the memory then.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
uhh... i H-A-T-E viewstate but it's just too convenient. Do you think it's a good idea to store the between-postback data in session instead? If so, would you suggest storing it on client or server?
Nila
|
|
|
|
|
I would just assess what needs to be stored in the viewstate and then turn off anything that doesn't. Yes, it is convenient, and to be honest it is a huge time saver. Bear in mind that the "memory consumed" at the browser should be reclaimed whatever was used.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Grapes-R-Fun wrote: Do you think it's a good idea to store the between-postback data in session instead?
Remember that session state is stored on the server. If you have a site with 100's or 1000's of users, that can be a real drain (depending on how much you store) on the server and reduce the number of users you can serve. Also if you use a webfarm it becomes much more challenging using session state this way.
only two letters away from being an asset
|
|
|
|
|
Silly me, I must have confused the session with cache
During the most severe case, at most I will have 400 people using it, and I have only one virtualized server (that's another 'uhhh' story) to dish out this app.
Now when Im done with a variable that is stored in session, if I set its value to null will the space be conserved, or do I pretty much have to abandon/timeout session all together?
Nila
|
|
|
|
|
The memory isn't really going to be recovered until the GC gets around to it. Although it doesn't seem as though your app would have any difficulties if you limited what you were storing. Keep in mind that IIS will scavange memory when needed, so you may lose session state from whatever sessions it determines are no longer in use, even if they are.
only two letters away from being an asset
|
|
|
|
|
Thanks a bunch Mark!!
I really like your signature, btw - it's so witty
Nila
|
|
|
|
|
hi nila..
thank u very much...
keep in touch
|
|
|
|
|
I have problem with paging of gridview control.
Guys can u tell me does grid view control contain scrolling property?
I am working on visual studio 2005.
Actuallly i want to display some data that i retrive it from wmi query..
But the data is so large., it could manage it in one page..
but still to see the data i need to scroll Iexplorer scoller.
So i want to provide scrolling property to grid view control.
Do u know how to do it?
|
|
|
|
|
You can set your gridview's width to 100% then put it inside a Panel control. Panel can be set to be scrollable...
Nila
|
|
|
|
|
You are welcome dear, codeproject is here just for times like this
Nila
|
|
|
|
|
Any one who have worked on Google APl's. Please Help me I have some problem in uploading pages. It works fine localy but when I upload it, it does not work.
Thankx in Advance
|
|
|
|
|
Have you generated the proper key for your stage/production server? Can you post your script so we all can take a look at it?
Nila
|
|
|
|
|
Can u please give me ur id of yahoo so that we can discuss it properly.
Yahoo or Skype
|
|
|
|
|
Safecom wrote: Can u please give me ur id of yahoo so that we can discuss it properly
Keep it on the forum - so we can all benefit!
|
|
|
|
|
Hi,
I've been working on local host to create a webform in asp.net. now I'supposed to deploy it on another server how could I do this?
Thank you
|
|
|
|
|
There is no need to deploy this just uplad it on server. It will work
|
|
|
|
|
|
Yes . Just copy ur pages and upload it to ur domain. But keep in mind that ur link should be like ur local.
|
|
|
|
|
Hello.
I would like to give my user the option to browse his files (like the simple fileUpload control do) and after selecting the file (and when the fileUpload control hold in his text box the full path and file name) I want to press another button and get the path+file name as a string.
I want to do this with out actually upload the file. I use the fileupload just for his browsing option.
the problem is that after selecting the file, the fileupload have a property called "fileName" that only return the file name and not the path.
Also, if i type a file name myself and not choosing it with the browse - It doesn't even recognaize it as a file name.
Any help?
How can I have a simple browsing control that save path+file name?
thanks!
|
|
|
|