Managing Multiple Login Activity in a single PC using web based application......

S

Shashi

I have developed ASP.Net application using .Net 1.1 Framework.
When the user clicks image file through Java script I am using my search
window as below.

QueryString = "frmMySearchWebForm.aspx?DOBDate=" + txtDOBDt
popUp =window.open(QueryString,null,
"height=50,width=80,status=no,left =0,top
=0,toolbar=no,menubar=no,location=no,scrollbars =yes");

When the user picks a certain customer in the frmMySearchWebForm I am
closing and resubmitting the main page and populating the fields in the main
screen.

function SetMemberData(MemNoChosen){
var theform = document.frmMyMain
popUp.close();
theform.elements["txtCustNo"].value = CustNoChosen;
theform.submit();
}
My question is when the user login with multiple sessions on the same PC,
either it is not opening one more search window for next session or
sometimes it is not populating the main window after user selects the
customer in the main page.

How to make manage multilpe sssion logins in the same PC?
Thanks,
Shashi
 
S

S. Justin Gengo

Sashi,

The javascript is going to target the window by name. I think you'll have to
give both your main window and the pop up distinct names. The easy way to do
this would be to add the session id to the window name.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
S

Shashi

Thanks.

S. Justin Gengo said:
Sashi,

The javascript is going to target the window by name. I think you'll have to
give both your main window and the pop up distinct names. The easy way to do
this would be to add the session id to the window name.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
Shashi said:
I have developed ASP.Net application using .Net 1.1 Framework.
When the user clicks image file through Java script I am using my search
window as below.

QueryString = "frmMySearchWebForm.aspx?DOBDate=" + txtDOBDt
popUp =window.open(QueryString,null,
"height=50,width=80,status=no,left =0,top
=0,toolbar=no,menubar=no,location=no,scrollbars =yes");

When the user picks a certain customer in the frmMySearchWebForm I am
closing and resubmitting the main page and populating the fields in the
main
screen.

function SetMemberData(MemNoChosen){
var theform = document.frmMyMain
popUp.close();
theform.elements["txtCustNo"].value = CustNoChosen;
theform.submit();
}
My question is when the user login with multiple sessions on the same PC,
either it is not opening one more search window for next session or
sometimes it is not populating the main window after user selects the
customer in the main page.

How to make manage multilpe sssion logins in the same PC?
Thanks,
Shashi
 
S

Shashi

I am using Java script to open the window. That means when the user clicks
on my Time.gif file, I am calling window.open('myform','ctlNAme')....
I have hardcoded the value and how to pass the session ID to create a unique
form name?
Shahi


Shashi said:
Thanks.

S. Justin Gengo said:
Sashi,

The javascript is going to target the window by name. I think you'll
have
to
give both your main window and the pop up distinct names. The easy way
to
do
this would be to add the session id to the window name.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
Shashi said:
I have developed ASP.Net application using .Net 1.1 Framework.
When the user clicks image file through Java script I am using my search
window as below.

QueryString = "frmMySearchWebForm.aspx?DOBDate=" + txtDOBDt
popUp =window.open(QueryString,null,
"height=50,width=80,status=no,left =0,top
=0,toolbar=no,menubar=no,location=no,scrollbars =yes");

When the user picks a certain customer in the frmMySearchWebForm I am
closing and resubmitting the main page and populating the fields in the
main
screen.

function SetMemberData(MemNoChosen){
var theform = document.frmMyMain
popUp.close();
theform.elements["txtCustNo"].value = CustNoChosen;
theform.submit();
}
My question is when the user login with multiple sessions on the same PC,
either it is not opening one more search window for next session or
sometimes it is not populating the main window after user selects the
customer in the main page.

How to make manage multilpe sssion logins in the same PC?
Thanks,
Shashi
 
S

S. Justin Gengo

Sashi,

You would need to write the script out the page from the code-behind page
using Page.RegisterScript or, if you're adding it to a button use
Button.Attributes.Add("onClick", "javascript:YourScriptHere();")

You can then access all the variables such as sessionId and add a unique
identifier of some type to the window name.

E.g.

Dim StringBuilder As New System.Text.StringBuilder

StringBuilder.Append("<script language="javascript">" & vbCrLf)
StringBuilder.Append("<!--" & vbCrLf)
StringBuilder.Append("function OpenPopUp()" & vbCrLf)
StringBuilder.Append("{" & vbCrLf)
StringBuilder.Append("window.open(QueryString, " & Session.ID.ToString
&,""height=50,width=80,status=no,left
=0,top=0,toolbar=no,menubar=no,location=no,scrollbars =yes"");" & vbCrLf)
StringBuilder.Append("//-->" & vbCrLf)
StringBuilder.Append("</script>" & vbCrLf)

Page.RegisterScript("PopUp", StringBuilder.ToString)

**Note: I would research Page.RegisterScript and Page.RegisterStartupScript
and please note the doubling of quotes in the codebehind window.open in
order to get a single quote into the html page.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
Shashi said:
I am using Java script to open the window. That means when the user clicks
on my Time.gif file, I am calling window.open('myform','ctlNAme')....
I have hardcoded the value and how to pass the session ID to create a
unique
form name?
Shahi


Shashi said:
Thanks.

S. Justin Gengo said:
Sashi,

The javascript is going to target the window by name. I think you'll
have
to
give both your main window and the pop up distinct names. The easy way
to
do
this would be to add the session id to the window name.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
I have developed ASP.Net application using .Net 1.1 Framework.
When the user clicks image file through Java script I am using my search
window as below.

QueryString = "frmMySearchWebForm.aspx?DOBDate=" + txtDOBDt
popUp =window.open(QueryString,null,
"height=50,width=80,status=no,left =0,top
=0,toolbar=no,menubar=no,location=no,scrollbars =yes");

When the user picks a certain customer in the frmMySearchWebForm I am
closing and resubmitting the main page and populating the fields in the
main
screen.

function SetMemberData(MemNoChosen){
var theform = document.frmMyMain
popUp.close();
theform.elements["txtCustNo"].value = CustNoChosen;
theform.submit();
}
My question is when the user login with multiple sessions on the same PC,
either it is not opening one more search window for next session or
sometimes it is not populating the main window after user selects the
customer in the main page.

How to make manage multilpe sssion logins in the same PC?
Thanks,
Shashi
 
S

Shashi

Justin,
We can add the code for server side controls. But I have these kind of code
for gif file. Example. I have kept one gif file next to date text box. where
in user will clcik on that and the user selects the date from the new
window.
Thanks for your all answers.
Shashi


S. Justin Gengo said:
Sashi,

You would need to write the script out the page from the code-behind page
using Page.RegisterScript or, if you're adding it to a button use
Button.Attributes.Add("onClick", "javascript:YourScriptHere();")

You can then access all the variables such as sessionId and add a unique
identifier of some type to the window name.

E.g.

Dim StringBuilder As New System.Text.StringBuilder

StringBuilder.Append("<script language="javascript">" & vbCrLf)
StringBuilder.Append("<!--" & vbCrLf)
StringBuilder.Append("function OpenPopUp()" & vbCrLf)
StringBuilder.Append("{" & vbCrLf)
StringBuilder.Append("window.open(QueryString, " & Session.ID.ToString
&,""height=50,width=80,status=no,left
=0,top=0,toolbar=no,menubar=no,location=no,scrollbars =yes"");" & vbCrLf)
StringBuilder.Append("//-->" & vbCrLf)
StringBuilder.Append("</script>" & vbCrLf)

Page.RegisterScript("PopUp", StringBuilder.ToString)

**Note: I would research Page.RegisterScript and Page.RegisterStartupScript
and please note the doubling of quotes in the codebehind window.open in
order to get a single quote into the html page.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
Shashi said:
I am using Java script to open the window. That means when the user clicks
on my Time.gif file, I am calling window.open('myform','ctlNAme')....
I have hardcoded the value and how to pass the session ID to create a
unique
form name?
Shahi


Shashi said:
Thanks.

Sashi,

The javascript is going to target the window by name. I think you'll have
to
give both your main window and the pop up distinct names. The easy
way
to
do
this would be to add the session id to the window name.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
I have developed ASP.Net application using .Net 1.1 Framework.
When the user clicks image file through Java script I am using my search
window as below.

QueryString = "frmMySearchWebForm.aspx?DOBDate=" + txtDOBDt
popUp =window.open(QueryString,null,
"height=50,width=80,status=no,left =0,top
=0,toolbar=no,menubar=no,location=no,scrollbars =yes");

When the user picks a certain customer in the frmMySearchWebForm I am
closing and resubmitting the main page and populating the fields in the
main
screen.

function SetMemberData(MemNoChosen){
var theform = document.frmMyMain
popUp.close();
theform.elements["txtCustNo"].value = CustNoChosen;
theform.submit();
}
My question is when the user login with multiple sessions on the same
PC,
either it is not opening one more search window for next session or
sometimes it is not populating the main window after user selects the
customer in the main page.

How to make manage multilpe sssion logins in the same PC?
Thanks,
Shashi
 
S

S. Justin Gengo

Sashi,

Did you know that you can make any control into a server side control?

For example here's how to make a regular old image tag into a server side
control:

1. Add an id and runat="server" attributes to your tag.
<img src="images/myimage.gif" id="Image1" runat="server">

2. Declare the image object in your code behind using the exact same name as
its id attribute.
Protected Image1 As System.Web.UI.HtmlControls.HtmlImage

3. If a tag you want to turn into a server side control does not have a
specific equivalent in the
HtmlControls collection declare it as a generic control:
System.Web.UI.HtmlControls.HtmlGenericControl

4. You may now add attributes (like your javascript onClick) to the image
tag as if it was a .NET control (now it is one).
Image1.Attributes.Add("onClick", "javascript:YourScriptHere();")

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
Shashi said:
Justin,
We can add the code for server side controls. But I have these kind of
code
for gif file. Example. I have kept one gif file next to date text box.
where
in user will clcik on that and the user selects the date from the new
window.
Thanks for your all answers.
Shashi


S. Justin Gengo said:
Sashi,

You would need to write the script out the page from the code-behind page
using Page.RegisterScript or, if you're adding it to a button use
Button.Attributes.Add("onClick", "javascript:YourScriptHere();")

You can then access all the variables such as sessionId and add a unique
identifier of some type to the window name.

E.g.

Dim StringBuilder As New System.Text.StringBuilder

StringBuilder.Append("<script language="javascript">" & vbCrLf)
StringBuilder.Append("<!--" & vbCrLf)
StringBuilder.Append("function OpenPopUp()" & vbCrLf)
StringBuilder.Append("{" & vbCrLf)
StringBuilder.Append("window.open(QueryString, " & Session.ID.ToString
&,""height=50,width=80,status=no,left
=0,top=0,toolbar=no,menubar=no,location=no,scrollbars =yes"");" & vbCrLf)
StringBuilder.Append("//-->" & vbCrLf)
StringBuilder.Append("</script>" & vbCrLf)

Page.RegisterScript("PopUp", StringBuilder.ToString)

**Note: I would research Page.RegisterScript and Page.RegisterStartupScript
and please note the doubling of quotes in the codebehind window.open in
order to get a single quote into the html page.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
Shashi said:
I am using Java script to open the window. That means when the user clicks
on my Time.gif file, I am calling window.open('myform','ctlNAme')....
I have hardcoded the value and how to pass the session ID to create a
unique
form name?
Shahi


Thanks.

Sashi,

The javascript is going to target the window by name. I think you'll
have
to
give both your main window and the pop up distinct names. The easy way
to
do
this would be to add the session id to the window name.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
I have developed ASP.Net application using .Net 1.1 Framework.
When the user clicks image file through Java script I am using my
search
window as below.

QueryString = "frmMySearchWebForm.aspx?DOBDate=" + txtDOBDt
popUp =window.open(QueryString,null,
"height=50,width=80,status=no,left =0,top
=0,toolbar=no,menubar=no,location=no,scrollbars =yes");

When the user picks a certain customer in the frmMySearchWebForm I am
closing and resubmitting the main page and populating the fields
in
the
main
screen.

function SetMemberData(MemNoChosen){
var theform = document.frmMyMain
popUp.close();
theform.elements["txtCustNo"].value = CustNoChosen;
theform.submit();
}
My question is when the user login with multiple sessions on the same
PC,
either it is not opening one more search window for next session
or
sometimes it is not populating the main window after user selects the
customer in the main page.

How to make manage multilpe sssion logins in the same PC?
Thanks,
Shashi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top