|
Balagurunathan S wrote: I am having a .aspx page with many controls in it.I have a text for logging out from my application.When the user clicks that "LogOut" text,he should be logged out from my application.I have written javascript function in Code behind to log out.How to call the javascript function in code behind by using href property of the text(Logout)..i.e when the user clicks the "Logout" text,the javascript function in code behind should be called..
For this,
ClientScript.RegisterClientScriptBlock(GetType(), "test", "<script text='text/javascript'> alert('test');</script>");
Balagurunathan S wrote: Moreover,another issue is that if the user closes the page without even logging out from my application,i need to call the same javascript function in the code behind whenever he attempts to close the page by clicking the close button in the page.
to call function close window you can do this.
<script type="text/javascript"><br />
<br />
function doUnload()<br />
{<br />
<br />
if (window.event.clientX < 0 && window.event.clientY < 0)<br />
{<br />
alert("Window is closing...");<br />
}<br />
}<br />
</script>
Call on body's UnLoad event.
<body onunload="doUnload();"><br />
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Thanks SunRays..
I have one more doubt..
I have a function named logout() in my codebehind..Now i need to call this when the user closes the page using the close button..I am not clear with the one which you sent earlier..Kindly guide me to do this..i.e give relevant code to do this..How to call the function..?
Regards,
Balaguru
|
|
|
|
|
Thanks SunRays..
Its ok for calling a javascript function..
I have one more doubt..
How do i call a function in vb code in code behind ..?
I have a function named logout() in my codebehind..Now i need to call this when the user closes the page using the close button..I am not clear with the one which you sent earlier..Kindly guide me to do this..i.e give relevant code to do this..How to call the function..?
Regards,
Balaguru
|
|
|
|
|
Hi,
actually for close window's I had sent you code for Javascript function.
Balagurunathan S wrote: How do i call a function in vb code in code behind ..?
FOr this you can do same way as I were said for javascript.
just write your function string in that.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
Add linkButton say lnkRedirect instead of href.
and in javscript write __doPostBack('lnkRedirect', '');
Nana
|
|
|
|
|
Have you enabled the PopulateOnDemand property of each node?
If so, you will see the "+" sign until you open it.
|
|
|
|
|
Thanks for reply.
It works well.
rajesh
|
|
|
|
|
when I try to connect to the database from visual web developer 2005
the test connection tests ok, but I get this error
"the idbtoolsoptionprovider service couldnot be found"
any help would be appreciated
|
|
|
|
|
The Database is a MDF one, SQL Server Express based? I have heard about some issues, you need to configure it to work with your IIS (if you are working using IIS).
Good luck
Braulio
/// -------------------------
Braulio Díez
tipsdotnet.com
/// -------------------------
|
|
|
|
|
Is anyone tell me how much an navigation URL could be weighted. I would like to ask that how much (max) an URL could be as space factor.
Thx
manoj Kumar Jha
"Learn to smile at every situation. See it as an opportunity to prove your strength and ability."
|
|
|
|
|
Do you want to know about the max size of the URL?
Apurva Kaushal
|
|
|
|
|
Yeah i refer weight to size of URL
manoj Kumar Jha
"Learn to smile at every situation. See it as an opportunity to prove your strength and ability."
|
|
|
|
|
The max length of a URl in IE can be 2083. You can also have a look at this[^].
Apurva Kaushal
|
|
|
|
|
THX, but if i m in condition that the URL is crossing the limit , what could be the solution .
manoj Kumar Jha
"Learn to smile at every situation. See it as an opportunity to prove your strength and ability."
|
|
|
|
|
I don't know about any workaround for that. Probably you have to reduce the length.
Apurva Kaushal
|
|
|
|
|
_TORPEDO_ wrote: Is anyone tell me how much an navigation URL could be weighted. I would like to ask that how much (max) an URL could be as space factor.
What do you mean by 'weighted'?
If you are referring to the maximum length of a URL, look at this article[^].
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi i am using session in my project file..,
I declared my sesssion timings in web.config file timeout=20...,
Its working in my system normally,if i give one min also with in one min the session is out...,
same thing in my server i said,but its not considering that session timing,
with in one or 2 min the session is expiring...,
I dont know whats the probs,
Plz anyone help me,
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
Can you please elaborate a little bit more on this.
If possible, please post a part of the web.config file which has Session parameters.
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
|
Use Server.UrlEncode(url) command to Encode the url.
|
|
|
|
|
Hello
I've populated a tree view from a selfjoined table and now I want to handle the event such that when the user clicks a node, I should just show the data of that record in a formview. I've done something similar in a desktop application but got no idea how to do it here. OnNodeClick was the event in desktop's case but here I dont know how to handle this situation
plz give me a few guidelines
Thanks
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
u check once the selection node changed property of the treeview
|
|
|
|
|
u mean I should handle SelectedNodeChanged event right
void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
{
//TreeNode
}
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
|
I'm on it and hoping for the best
Thanks
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|