|
Its not good to get client events by using the javascript.
Another way is to write the code in the Session_End event similar event is there (I forgot )
there you can have you logic what you want to do whenever user session has been end.
One question
1. Do you need to do update the DB no sooner user closed the window ?
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... "
Check My Blog
|
|
|
|
|
Sandeep Akhare wrote: Its not good to get client events by using the javascript.
Then how will you trap the browser close event ?
if you want to detect browser close you have to use javascript.
Sandeep Akhare wrote: Another way is to write the code in the Session_End event similar event is there (I forgot D'Oh! )
there you can have you logic what you want to do whenever user session has been end.
if you use Session.Abandon(), it will directly moved to Session_End() event in your Global.asax file, and inside that methods you can write your logic that what ever you want to implement.
Sandeep Akhare wrote: One question
1. Do you need to do update the DB no sooner user closed the window ?
As per my understanding, he is storing some user information while user log into the system. and he is removing those in the log off. But, the problem happens when user close the browser. If user close the browser, Session_end() will only call when its time out.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Abhijit Jana wrote: As per my understanding, he is storing some user information while user log into the system. and he is removing those in the log off. But, the problem happens when user close the browser. If user close the browser, Session_end() will only call when its time out.
That should fine and this make sure that every time Session_End gets called
1. Please tell me what happens when system crashed or browser crashed for a perticular user...
2. depending on the client browser is not idle way as there can be many scenario there javascript may get failed.
that's why i asked him is it necessary to update the DB no sonner user closed the browser?
I think log information he can update when session_end gets called?
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... "
Check My Blog
|
|
|
|
|
Karthick_gc wrote: Thank u. Can u give some links to refer for the solution?
You can try this one,
function DeleteUserLog()
{
if(window.event.clientX < 0 && window.event.clientY <0)
{
window.open("CloseSession.aspx", "OpenWindow_Close_Session",'left=12000,top=1200,width=10,height=1');
}
}
Call this method on unload of your master Body .
onunload="DeleteUserLog()"
Now in CloseSession.aspx pages, you can do what ever you want and register the client script to close it automatically after doing the task.
Hope this will helps you.
BTW : I am planning for writing an article on same. Hope this will be published soon.
Cheers!!
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
How to retrive attribute Name
<br />
<names><br />
<firstname fn="*"></firstname><br />
<zipcode zc="*"></zipcode><br />
<rule rl="%LEIN"></rule><br />
</names><br />
Here the thing is in some Names tag the attribute of Rule is RL or RLL.
<br />
<br />
<rule rl="%LEIN"></rule><br />
<rule rll="%LEIN"></rule><br />
<br />
I am getting error at bold line below. Bcz, i mentioned direcly RLL. If RL exists as attirbute then getting error. how to get attribute name?
XmlNodeList NameList = doc.GetElementsByTagName("Names");
foreach (XmlNode node in NameList)
{
XmlElement nameElement = (XmlElement)node;
foreach (XmlNode xnode in nameElement)
{
XmlElement childElement = (XmlElement)xnode;
if (childElement.Name.ToLower() == "rule")
{
if (childElement.HasAttributes)
strrule = childElement.Attributes["RLL"].InnerText.ToLower();
}
}
}
G. Satish
|
|
|
|
|
if (childElements.Attributes["RLL"] != null)
{
//Get that value
}
else
{
//Get other value.
}
|
|
|
|
|
Dear All
can anybody please tell me how can i call Oracle Report using C# Asp.Net?
what peace of code would required?
Regards,
MF
|
|
|
|
|
I haven't used a recent version of Oracle Reports, but according to their faq:
How do I integrate Oracle Reports into my application?
If your application is Web- or J2EE-based, either embed the URL to call your Web-deployed reports within your application or use Oracle Reports Web Services. If you are using Oracle Forms, use the built-in RUN_REPORT_OBJECT procedure to communicate with the Reports Server. In order to integrate reports into your application on the database level, you can use the event-based reporting API to submit jobs to Oracle Reports Services from the database by calling this PL/SQL-API.
So, I guess it depends on what you mean by "call". If you just want to bring up a report, it looks like you can point to the report URL. There doesn't seem to any real api, especially .NET based.
Scott
|
|
|
|
|
hi,
thanks for your answer. i just ask that.
WHAT PEACE OF CODE WOULD I USE TO CALL ORACLE REPORT THROUGH C# ASP.NET?
what line of code required?
Regards,
MF
modified on Sunday, April 26, 2009 11:54 PM
|
|
|
|
|
|
hi,
this link is not working....
whenever i click it post me at Google search...
please send me full link.
Regards,
MF
|
|
|
|
|
Hi all,
How can I convert a HTML file to .Doc file in C#.net? Currently i am using ghtmldoc.exe with arguments "--webpage -f " + DocFile + " " + html file". However the conversion is successful but the resulting Doc file is missing images in it. Can somebody help me out or knows some other workaround to convert HTML to DOC.
Happy Coding,
Vivek Rathore
|
|
|
|
|
Hi guys,
Hope you are doing well.
I have a Onix complaint XML document that I want to validate it with some Onix complaint DTD. I did coding for same in C#
XmlReaderSettings settings = null;
try
{
string xmlPath = Server.MapPath("XML/nielsen_onix.XML");
//Load XML into XmlTextReader
// reader = new XmlTextReader(xmlPath);
//Load XmlTextReader into XmlValidatingReader
settings = new XmlReaderSettings();
//Set the validation type
settings.ValidationType = ValidationType.DTD;
settings.ProhibitDtd = false;
settings.CheckCharacters = false;
//Hook up the XmlValidatingReader’s
//ValidationEventHandler to a call
//back method named ValidationCallBack
settings.ValidationEventHandler += new ValidationEventHandler(
this.ValidationCallBack);
XmlReader reader = XmlReader.Create(xmlPath, settings);
//Read through the XML document by calling
//the Read() method
while (reader.Read()) { }
//Check boolean field named valid (located at top of code)
if (valid)
Response.Write("Validation is Successful!");
reader.Close();
}
catch(Exception ex) {
Response.Write(ex.Message);
}
This code runs good and show the xml file invaid while my xml file is valid when I validated it on
http://www.w3schools.com/XML/xml_validator.asp[^]
Could you please check what's wrong going with me?
Any help would be highly appreciable.
Thanks
Rohit
|
|
|
|
|
Hello All!!!
I have a problem with UpdatePanel. My .aspx Page contains UpdatePanel control, for load Ajax controls. And inside UpdatePanel control i have a FileUpload control, when i add one file in this control and press button Upload (in here onclick function i verify FileUpload control contain or no file: if(idofUpdatePanel.HasFile)) i obtain HasFile = false.
I thing this problem is because control UpdatePanel.
Help me please for resolve it...
Thanks!!!
|
|
|
|
|
Hi wertyk,
Try to use Trigger(Post Back trigger) with ControlID="uploadbtnId" within the update panel and check,then it works fine.
Regards,
sundeep
|
|
|
|
|
Hi.. I have to use html editor for my asp.net page. Pls tell any dll name for htmleditor. i have already used Winthusiasm dll... Is there any dll available other than it...
|
|
|
|
|
how to display a message box after execution of save button code
I am doing this
savempdet();
updaddbook();
txt_contactno.Text = "";
txt_addline1.Text = "";
txt_addline2.Text = "";
txt_addline3.Text = "";
txt_coradd.Text = "";
lbl_msg.Visible = true;
Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "Message", "alert('data saved successfully');", true);
lbl_msg.Text = "Data Update Sucessfully";
but message box comes before the execution of the code.
|
|
|
|
|
Hi, try this
Public Sub MessageBox(ByVal Page As System.Web.UI.Page, ByVal Msg As String)
ScriptManager.RegisterClientScriptBlock(Page, Page.GetType, "clientScript", "javascript:alert('" & Msg & "');", True)
End Sub
Hope this one can help
|
|
|
|
|
This gives the same result as mine code ....i want message after execution of the code.
|
|
|
|
|
try this...
Response.Write("alert('message')");
beula.
CMOTS INFOTECH
|
|
|
|
|
Hi Friends,
i am new to asp.net technology.i developed one site using VS-2005 and Sql server-2005 on windows xp.
i tried to run this site in another system.in that system there is no VS-2005 and sql server 2005 installed.
Is there any way to run my site without installing these softwares?(i already developed my site and i want to run on Intranet).
Please help me...
I searched many sites but i not found exact answer.
Thanks in advance.
|
|
|
|
|
Hi,
Are you using a Database?
If yes, pls configurate your web config.
Nothing to install any software to the another pc.
If you have an error, pls post it.
Thanks
|
|
|
|
|
You have to install .net framework, iis and sql server in one pc
|
|
|
|
|
Thank you for your repliy friends,
my site has database.
while running it is giving the code of my Home.aspx page.
Also tell me how to install .net framework?
i developed my site using asp.net v2.0.
Thanks in advance
|
|
|
|
|
Hi,
Few days ago I posted my problem in the forum and even after long discussion no conclusion was arrived. Now i came to know that problem was beacuse of I.E. 8
and after clikcing on the Compatibilty View button to support earlier versions such problem can be overcome.
But i want to know how to make IE8 compatible applications so that such issues cant arise.
Abhijit, Yusuf or anyone else any idea about this.
|
|
|
|