|
N a v a n e e t h wrote: Is it a good practice on believing javascript for this ?
Well, AJAX is the only way you can find out if the browser was closed. It's wise to add code to manually clear sessions you know have timed out, also, if you must do this at all.
N a v a n e e t h wrote: So the flag there in user table still show he is online, and prevents him from logging again.
That's the main reason that I said it's better to kill the old session and allow a new login to take precedence.
N a v a n e e t h wrote: I think there is no efficient methods for this. What do you say ?
Yes, it's messy, no matter how you look at it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: Yes, it's messy, no matter how you look at it.
Yes it is.
It's not possible to believe on session_end also, which won't be fired all time, and it's specific for InProc.
I have seen some examples which explains this in much more efficient way by making use of cache. Cache timeout will be set as session timeout time and assign a callback function when cache timed out. Inside this function we will be able to update the flag.
This looks much closer to the problem. ?
|
|
|
|
|
With AJAX, you can capture a client side event when the browser is closed, and send a message to the server. That's what I was referring to. But, it's still messy. Turn the power off, that's the obvious example that you cannot code for.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi, Thanks for Reply
Can I check that current session_id is live or dead.
If i get that then i can compare it with session id stored in database,
if it is still live then i can restrict user from login.
kiranbanker
|
|
|
|
|
Many times answered for the same question by different people. Try doing a serch on this discussion board.
|
|
|
|
|
To maintain online users, you should go with database. On closing browser using javascript onUnload event check the window size and if less than or equal to zero update the logout flag in database as false thru AJAX. On every time login show the online users with that flag as true.
Be simple and Be sample.
|
|
|
|
|
I am using iframe in menu designing,i am getting menu in all browser like,firfox,IE6,IE7,Netscape.But in Safari Browser i am unable to see the menu.
so i need help on this,the menu should work on all the Browser.
|
|
|
|
|
hi
I m using FCK editor For Description Field in my application.and Assign Required Filed validator To that Filed.the problem is that if FCK editor contains a value then also the required filed validator error message is display..
Jintal Patel
|
|
|
|
|
Change CausesValidation="true" to CausesValidation="false" and then check whether u get the same problem.
|
|
|
|
|
hi
FCK editor Dose'n have CauseValidation Property
Jintal Patel
|
|
|
|
|
Hi,
My application requirement is that i need to navigate from Page1 to Page2 and from Page2 to Page3 Or directly from Page1 to Page3. For transferring from Page1 to Page2 i am passing the following page path in Server.Transfer "GridCollection/GridPages/GenDGSelect.aspx", this works fine. But when we transfer from Page2 to Page3 we pass the following path "GridCollection/GridPages/GenDG.aspx" we get the error "Error executing child request ...". The path is proper and ideally it should work.
Surprisingly when i navigate from Page1 To Page3 using the above mentioned path it works fine.
Also when i change the path of Page3 to "../GridCollection/GridPages/GenDG.aspx", transfer from Page2 to Page3 works fine but the same fails while transferring from Page1.
I am totally confused out here, please help me out.
Thanks,
Anees
|
|
|
|
|
Your paths are relative. Start them with a ~ and make sure you specify the path from the root. The .. works because you're specifying a step up, the control that renders this is in a subfolder, obviously.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Yes, it works. Thanks a lot
|
|
|
|
|
Anees Mitha wrote: we get the error "Error executing child request ..."
Have you set EnableViewStateMac=true on page3 ?
One more thing to consider when using Server.Transfer is, when you transfer from page1 to page2, URL in the address bar will remain as page1. But when you transfer again from page2 to page3, then your URL will be changed to page2. This is how Server.Transfer works.
|
|
|
|
|
Hi Navaneeth,
I have changed the path by starting it with a "~" and it is working. Also have never noticed on the point which u have mentioned above, after reading yr mail i observerd and it is working that ways. Thanks for yr help.
Regards,
Anees
|
|
|
|
|
Hi All
I am creating a custom control, in it i have to use a user control how can i add a user control to a custom control ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Don't know exactly you can do this, try Page.Control.Add(UserControl). But why you need this ? In a custom controls all the HTML tags are written manually in the Render() method. So I don't think that you can use the user control.
Why don't you implement the usercontrol functionality in your custom control instead of adding it ?
|
|
|
|
|
If the functionality is readily available then why should write that again ?
Any way i think i will have to add that functionality now .
Again one question can i add asp.net controls to custom control ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Sandeep Akhare wrote: Again one question can i add asp.net controls to custom control ?
You should look in to the ASP.NET control rendering. When rendering each control, Render() method will be executed. So you can write only HTML elements to the response using HtmlTextWriter object available on the overided method. Whatever ASPX tags you wrote inside this will be displayed on the page without rendering.
You can create object for the ASP.NET controls and write their rendered HTML to the Response instead of writing the tag.
Hope you are clear
|
|
|
|
|
You can try this :
protected override void CreateChildControls()
{
Control my = LoadControl("userControl.ascx");
this.Controls.Add(my);
}
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
|
Hi All,
I m running my application at server, n i have set session timeout period 400. but within a minute session has out,n i have st max pool size 10000, but problem not solve,plz help me if u have solution.
thanks.
|
|
|
|
|
Did you define below three property in your connection string. Set the property according to your requirement.
Connect Timeout=200; pooling='true'; Max Pool Size=200
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
yes i have defined all these three properties.
|
|
|
|
|
Sorry I think you are facing different problems that I had suggested you earlier.
In my perspective, you need to set out SESSION STATE SETTINGS in web.config file thus go through that configuration.
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|