Showing posts with label popup. Show all posts
Showing posts with label popup. Show all posts

Thursday, March 22, 2012

Trouble with popups

I have a aspx page and I want to do a popup to another page when my page is loaded and when click a button into a data grid. How can I do it ?

I have tried the next but It don`t work.
with a button out of a datagrid it works fine.

miboton is the name of a button in an itemtemplate into a datagrid. The compiler not recognize the name of the control. Why is it in a datagrid??

thanks in advance

Sub Page_Load(sender As Object, e As EventArgs)
openpopup(miboton,"http://www.baanfans.com", "ventana", 200, 300)
end Sub

Sub OpenPopUp(ByVal opener As System.Web.UI.WebControls.WebControl, ByVal PagePath As String, ByVal windowName As String, ByVal width As Integer, ByVal height As Integer)

Dim clientScript As String
Dim windowAttribs As String

windowAttribs = "width=" & width & "px," & _
"height=" & height & "px," & _
"left='+((screen.width -" & width & ") / 2)+'," & _
"top='+ (screen.height - " & height & ") / 2+'"

clientScript = "window.open('" & PagePath & "','" & windowName & "','" & windowAttribs & "');return false;"
opener.Attributes.Add("onclick", clientScript)

End SubMaybe you can take a look atthis control.

Grz, Kris.
Hello, you would like to check this link:Pop Up Window.

Good Luck.
the code that I posted above works fine. The trouble is what I want is to do a pop up when my page is loaded and click a button that it is in an item template. I have any trouble to do the popup with a button alone.

thanks for your reply.
Hello, could u please check this article.Embedding Java Scripts in ASP.NET

Good Luck.

Trouble with popup windows

I am building an ASP.NET application where I have been required to make all
the editing screens popup windows within the application. I didn't have any
trouble creating the new windows but only about half of them show on top of
the main application when they are created. The window are created in
javascript and I've tried using the top property of the window object but it
still does not work for all my windows and all the windows are created usin
g
the same command. Am I missing something in javascript or is this an issue
with the new Internet Explorer?
This is the code I used to create my popup windows:
'Create a script to bring up the update window
strScript = "<script language='javascript'>"
strScript &=
"window.open('frmServiceLogUpdate.aspx?mode=update&servicelogid=" &
CInt(TableRow_LogID.Value) & "&clientid=" & Session("ServiceClientID") &
" ','AddLog','width=522,height=450,top=100
,left=200,directories=no,location=n
o,menubar=no,scrollbars=no,status=no,too
lbar=no,resizable=no');window.top(0)
;"
strScript &= "</script>"
'Execute the script
RegisterClientScriptBlock("NewEntry", strScript)
Any help would be greatly appreciated.couple of issues.
1) your generating pop's with inline script will not work with popup
blockers (ie xp-sp2).
2) if the popup window already exists, window open will not bring it to the
front, you need to set focus to the window
3) if the popup window has been minimized, you need to close and reopen the
window.
-- bruce (sql;work.com).
"clsmith66" <clsmith66@.discussions.microsoft.com> wrote in message
news:BAA27463-924B-481C-9971-307C6BFB3219@.microsoft.com...
| I am building an ASP.NET application where I have been required to make
all
| the editing screens popup windows within the application. I didn't have
any
| trouble creating the new windows but only about half of them show on top
of
| the main application when they are created. The window are created in
| javascript and I've tried using the top property of the window object but
it
| still does not work for all my windows and all the windows are created
using
| the same command. Am I missing something in javascript or is this an
issue
| with the new Internet Explorer?
|
| This is the code I used to create my popup windows:
|
| 'Create a script to bring up the update window
| strScript = "<script language='javascript'>"
| strScript &=
| "window.open('frmServiceLogUpdate.aspx?mode=update&servicelogid=" &
| CInt(TableRow_LogID.Value) & "&clientid=" & Session("ServiceClientID") &
|
" ','AddLog','width=522,height=450,top=100
,left=200,directories=no,location=n
o,menubar=no,scrollbars=no,status=no,too
lbar=no,resizable=no');window.top(0)
;"
| strScript &= "</script>"
|
| 'Execute the script
| RegisterClientScriptBlock("NewEntry", strScript)
|
| Any help would be greatly appreciated.
Thank you for your quick response but I am still having some difficulties.
In response to your sugesstions I already had the popup blocker turned off,
the popup windows are only created when a user clicks a button and are close
d
after use, and the window can not be resized. I tried using the focus metho
d
on the window but still with no luck. For example on one page a user can
open a window to add a new entry to a table or they can open a window to edi
t
an existing entry. If I click the button to edit the entry, no problems the
window opens on top of the application. If I click the button to add an
entry, the new window opens but it is created underneath the application.
Both windows open the same asp.net page and the only difference in the code
are the parameters each one passs. I am very .
Chris
"bruce barker" wrote:

> couple of issues.
> 1) your generating pop's with inline script will not work with popup
> blockers (ie xp-sp2).
> 2) if the popup window already exists, window open will not bring it to th
e
> front, you need to set focus to the window
> 3) if the popup window has been minimized, you need to close and reopen th
e
> window.
> -- bruce (sql;work.com).
>
> "clsmith66" <clsmith66@.discussions.microsoft.com> wrote in message
> news:BAA27463-924B-481C-9971-307C6BFB3219@.microsoft.com...
> | I am building an ASP.NET application where I have been required to make
> all
> | the editing screens popup windows within the application. I didn't have
> any
> | trouble creating the new windows but only about half of them show on top
> of
> | the main application when they are created. The window are created in
> | javascript and I've tried using the top property of the window object bu
t
> it
> | still does not work for all my windows and all the windows are created
> using
> | the same command. Am I missing something in javascript or is this an
> issue
> | with the new Internet Explorer?
> |
> | This is the code I used to create my popup windows:
> |
> | 'Create a script to bring up the update window
> | strScript = "<script language='javascript'>"
> | strScript &=
> | "window.open('frmServiceLogUpdate.aspx?mode=update&servicelogid=" &
> | CInt(TableRow_LogID.Value) & "&clientid=" & Session("ServiceClientID") &
> |
> " ','AddLog','width=522,height=450,top=100
,left=200,directories=no,location
=n
> o,menubar=no,scrollbars=no,status=no,too
lbar=no,resizable=no');window.top(
0)
> ;"
> | strScript &= "</script>"
> |
> | 'Execute the script
> | RegisterClientScriptBlock("NewEntry", strScript)
> |
> | Any help would be greatly appreciated.
>
>
Just curious.. Is smartnav enabled in your web.config? I have noticed this
problem when smartnav is enabled.
"clsmith66" wrote:
> Thank you for your quick response but I am still having some difficulties.
> In response to your sugesstions I already had the popup blocker turned off
,
> the popup windows are only created when a user clicks a button and are clo
sed
> after use, and the window can not be resized. I tried using the focus met
hod
> on the window but still with no luck. For example on one page a user can
> open a window to add a new entry to a table or they can open a window to e
dit
> an existing entry. If I click the button to edit the entry, no problems t
he
> window opens on top of the application. If I click the button to add an
> entry, the new window opens but it is created underneath the application.
> Both windows open the same asp.net page and the only difference in the cod
e
> are the parameters each one passs. I am very .
> Chris
> "bruce barker" wrote:
>

Trouble with popup windows

I am building an ASP.NET application where I have been required to make all
the editing screens popup windows within the application. I didn't have any
trouble creating the new windows but only about half of them show on top of
the main application when they are created. The window are created in
javascript and I've tried using the top property of the window object but it
still does not work for all my windows and all the windows are created using
the same command. Am I missing something in javascript or is this an issue
with the new Internet Explorer?

This is the code I used to create my popup windows:

'Create a script to bring up the update window
strScript = "<script language='javascript'>"
strScript &=
"window.open('frmServiceLogUpdate.aspx?mode=update&servicelogid=" &
CInt(TableRow_LogID.Value) & "&clientid=" & Session("ServiceClientID") &
"','AddLog','width=522,height=450,top=100,left=200, directories=no,location=no,menubar=no,scrollbars=n o,status=no,toolbar=no,resizable=no');window.top(0 );"
strScript &= "</script>"

'Execute the script
RegisterClientScriptBlock("NewEntry", strScript)

Any help would be greatly appreciated.couple of issues.

1) your generating pop's with inline script will not work with popup
blockers (ie xp-sp2).
2) if the popup window already exists, window open will not bring it to the
front, you need to set focus to the window
3) if the popup window has been minimized, you need to close and reopen the
window.

-- bruce (sql;work.com).

"clsmith66" <clsmith66@.discussions.microsoft.com> wrote in message
news:BAA27463-924B-481C-9971-307C6BFB3219@.microsoft.com...
| I am building an ASP.NET application where I have been required to make
all
| the editing screens popup windows within the application. I didn't have
any
| trouble creating the new windows but only about half of them show on top
of
| the main application when they are created. The window are created in
| javascript and I've tried using the top property of the window object but
it
| still does not work for all my windows and all the windows are created
using
| the same command. Am I missing something in javascript or is this an
issue
| with the new Internet Explorer?
|
| This is the code I used to create my popup windows:
|
| 'Create a script to bring up the update window
| strScript = "<script language='javascript'>"
| strScript &=
| "window.open('frmServiceLogUpdate.aspx?mode=update&servicelogid=" &
| CInt(TableRow_LogID.Value) & "&clientid=" & Session("ServiceClientID") &
|
"','AddLog','width=522,height=450,top=100,left=200, directories=no,location=n
o,menubar=no,scrollbars=no,status=no,toolbar=no,re sizable=no');window.top(0)
;"
| strScript &= "</script>"
|
| 'Execute the script
| RegisterClientScriptBlock("NewEntry", strScript)
|
| Any help would be greatly appreciated.
Thank you for your quick response but I am still having some difficulties.
In response to your sugesstions I already had the popup blocker turned off,
the popup windows are only created when a user clicks a button and are closed
after use, and the window can not be resized. I tried using the focus method
on the window but still with no luck. For example on one page a user can
open a window to add a new entry to a table or they can open a window to edit
an existing entry. If I click the button to edit the entry, no problems the
window opens on top of the application. If I click the button to add an
entry, the new window opens but it is created underneath the application.
Both windows open the same asp.net page and the only difference in the code
are the parameters each one passs. I am very confused.

Chris

"bruce barker" wrote:

> couple of issues.
> 1) your generating pop's with inline script will not work with popup
> blockers (ie xp-sp2).
> 2) if the popup window already exists, window open will not bring it to the
> front, you need to set focus to the window
> 3) if the popup window has been minimized, you need to close and reopen the
> window.
> -- bruce (sql;work.com).
>
> "clsmith66" <clsmith66@.discussions.microsoft.com> wrote in message
> news:BAA27463-924B-481C-9971-307C6BFB3219@.microsoft.com...
> | I am building an ASP.NET application where I have been required to make
> all
> | the editing screens popup windows within the application. I didn't have
> any
> | trouble creating the new windows but only about half of them show on top
> of
> | the main application when they are created. The window are created in
> | javascript and I've tried using the top property of the window object but
> it
> | still does not work for all my windows and all the windows are created
> using
> | the same command. Am I missing something in javascript or is this an
> issue
> | with the new Internet Explorer?
> |
> | This is the code I used to create my popup windows:
> |
> | 'Create a script to bring up the update window
> | strScript = "<script language='javascript'>"
> | strScript &=
> | "window.open('frmServiceLogUpdate.aspx?mode=update&servicelogid=" &
> | CInt(TableRow_LogID.Value) & "&clientid=" & Session("ServiceClientID") &
> |
> "','AddLog','width=522,height=450,top=100,left=200, directories=no,location=n
> o,menubar=no,scrollbars=no,status=no,toolbar=no,re sizable=no');window.top(0)
> ;"
> | strScript &= "</script>"
> |
> | 'Execute the script
> | RegisterClientScriptBlock("NewEntry", strScript)
> |
> | Any help would be greatly appreciated.
>
Just curious.. Is smartnav enabled in your web.config? I have noticed this
problem when smartnav is enabled.

"clsmith66" wrote:

> Thank you for your quick response but I am still having some difficulties.
> In response to your sugesstions I already had the popup blocker turned off,
> the popup windows are only created when a user clicks a button and are closed
> after use, and the window can not be resized. I tried using the focus method
> on the window but still with no luck. For example on one page a user can
> open a window to add a new entry to a table or they can open a window to edit
> an existing entry. If I click the button to edit the entry, no problems the
> window opens on top of the application. If I click the button to add an
> entry, the new window opens but it is created underneath the application.
> Both windows open the same asp.net page and the only difference in the code
> are the parameters each one passs. I am very confused.
> Chris
> "bruce barker" wrote:
> > couple of issues.
> > 1) your generating pop's with inline script will not work with popup
> > blockers (ie xp-sp2).
> > 2) if the popup window already exists, window open will not bring it to the
> > front, you need to set focus to the window
> > 3) if the popup window has been minimized, you need to close and reopen the
> > window.
> > -- bruce (sql;work.com).
> > "clsmith66" <clsmith66@.discussions.microsoft.com> wrote in message
> > news:BAA27463-924B-481C-9971-307C6BFB3219@.microsoft.com...
> > | I am building an ASP.NET application where I have been required to make
> > all
> > | the editing screens popup windows within the application. I didn't have
> > any
> > | trouble creating the new windows but only about half of them show on top
> > of
> > | the main application when they are created. The window are created in
> > | javascript and I've tried using the top property of the window object but
> > it
> > | still does not work for all my windows and all the windows are created
> > using
> > | the same command. Am I missing something in javascript or is this an
> > issue
> > | with the new Internet Explorer?
> > |
> > | This is the code I used to create my popup windows:
> > |
> > | 'Create a script to bring up the update window
> > | strScript = "<script language='javascript'>"
> > | strScript &=
> > | "window.open('frmServiceLogUpdate.aspx?mode=update&servicelogid=" &
> > | CInt(TableRow_LogID.Value) & "&clientid=" & Session("ServiceClientID") &
> > |
> > "','AddLog','width=522,height=450,top=100,left=200, directories=no,location=n
> > o,menubar=no,scrollbars=no,status=no,toolbar=no,re sizable=no');window.top(0)
> > ;"
> > | strScript &= "</script>"
> > |
> > | 'Execute the script
> > | RegisterClientScriptBlock("NewEntry", strScript)
> > |
> > | Any help would be greatly appreciated.

Trouble With Session State

Hello,
I am having trouble with session state in my asp.net 1.1 C# web app. I
am trying to program either a popup box warning of expiration, or I
may do a redirect to the home page upon expiration.
But I can't seem to get started, because I am getting values that I do
not understand. In IIS settings, I stopped my website/app and went
into the properties for it and selected the "Home Directory" tab. Then
I clicked the "Configuration" button and selected the "Options" tab.
Then under the "Application Configuration" group, I verified that the
box for "Enable session state" was checked. Then I changed the value
to "2" (just for testing). I then saved and restarted my website.
Then I opened the site in Visual Studio.net and went into the
web.config file and changed the forms authentication timeout value to
"1" (again, just for testing).
Then when I ran my code, in debug mode/step through, I can see that
the value being returned for "this.Session.Timeout" is "15"? What's
going on here? I thought that when I set the value in IIS, it would
make it 2, but that didn't happen? Where is this number coming from?
How can I change/control it?
Your help is much appreciated.
JP"Joey" <joey.powell@.topscene.com> wrote in message
news:1176914556.144456.278850@.b75g2000hsg.googlegroups.com...
> Hello,
> I am having trouble with session state in my asp.net 1.1 C# web app. I
> am trying to program either a popup box warning of expiration, or I
> may do a redirect to the home page upon expiration.
> But I can't seem to get started, because I am getting values that I do
> not understand. In IIS settings, I stopped my website/app and went
> into the properties for it and selected the "Home Directory" tab. Then
> I clicked the "Configuration" button and selected the "Options" tab.
> Then under the "Application Configuration" group, I verified that the
> box for "Enable session state" was checked. Then I changed the value
> to "2" (just for testing). I then saved and restarted my website.
I believe these values are for classic ASP, not for ASP.NET.
--
John Saunders [MVP]
On Apr 18, 12:34 pm, "John Saunders [MVP]" <john.saunders at
trizetto.com> wrote:
> "Joey" <joey.pow...@.topscene.com> wrote in message
> news:1176914556.144456.278850@.b75g2000hsg.googlegroups.com...
>
>
>
> I believe these values are for classic ASP, not for ASP.NET.
> --
> John Saunders [MVP]
So how does one set session timeout for asp.net?
Use the sessionState entry in Web.Config...
--
Brad
"Software is like melted pudding..."
"Joey" wrote:

> On Apr 18, 12:34 pm, "John Saunders [MVP]" <john.saunders at
> trizetto.com> wrote:
> So how does one set session timeout for asp.net?
>
On Apr 18, 12:54 pm, Brad Roberts <BradRoberts56noj...@.hotmail.com>
wrote:
> Use the sessionState entry in Web.Config...
> --
> Brad
> "Software is like melted pudding..."
>
> "Joey" wrote:
>
>
>
>
>
>
>
> - Show quoted text -
Thanks

Tuesday, March 13, 2012

Trouble With Session State

Hello,

I am having trouble with session state in my asp.net 1.1 C# web app. I
am trying to program either a popup box warning of expiration, or I
may do a redirect to the home page upon expiration.

But I can't seem to get started, because I am getting values that I do
not understand. In IIS settings, I stopped my website/app and went
into the properties for it and selected the "Home Directory" tab. Then
I clicked the "Configuration" button and selected the "Options" tab.
Then under the "Application Configuration" group, I verified that the
box for "Enable session state" was checked. Then I changed the value
to "2" (just for testing). I then saved and restarted my website.

Then I opened the site in Visual Studio.net and went into the
web.config file and changed the forms authentication timeout value to
"1" (again, just for testing).

Then when I ran my code, in debug mode/step through, I can see that
the value being returned for "this.Session.Timeout" is "15"? What's
going on here? I thought that when I set the value in IIS, it would
make it 2, but that didn't happen? Where is this number coming from?
How can I change/control it?

Your help is much appreciated.

JP"Joey" <joey.powell@.topscene.comwrote in message
news:1176914556.144456.278850@.b75g2000hsg.googlegr oups.com...

Quote:

Originally Posted by

Hello,
>
I am having trouble with session state in my asp.net 1.1 C# web app. I
am trying to program either a popup box warning of expiration, or I
may do a redirect to the home page upon expiration.
>
But I can't seem to get started, because I am getting values that I do
not understand. In IIS settings, I stopped my website/app and went
into the properties for it and selected the "Home Directory" tab. Then
I clicked the "Configuration" button and selected the "Options" tab.
Then under the "Application Configuration" group, I verified that the
box for "Enable session state" was checked. Then I changed the value
to "2" (just for testing). I then saved and restarted my website.


I believe these values are for classic ASP, not for ASP.NET.
--

John Saunders [MVP]
On Apr 18, 12:34 pm, "John Saunders [MVP]" <john.saunders at
trizetto.comwrote:

Quote:

Originally Posted by

"Joey" <joey.pow...@.topscene.comwrote in message
>
news:1176914556.144456.278850@.b75g2000hsg.googlegr oups.com...
>

Quote:

Originally Posted by

Hello,


>

Quote:

Originally Posted by

I am having trouble with session state in my asp.net 1.1 C# web app. I
am trying to program either a popup box warning of expiration, or I
may do a redirect to the home page upon expiration.


>

Quote:

Originally Posted by

But I can't seem to get started, because I am getting values that I do
not understand. In IIS settings, I stopped my website/app and went
into the properties for it and selected the "Home Directory" tab. Then
I clicked the "Configuration" button and selected the "Options" tab.
Then under the "Application Configuration" group, I verified that the
box for "Enable session state" was checked. Then I changed the value
to "2" (just for testing). I then saved and restarted my website.


>
I believe these values are for classic ASP, not for ASP.NET.
--
>
John Saunders [MVP]


So how does one set session timeout for asp.net?
Use the sessionState entry in Web.Config...
--
Brad

"Software is like melted pudding..."

"Joey" wrote:

Quote:

Originally Posted by

On Apr 18, 12:34 pm, "John Saunders [MVP]" <john.saunders at
trizetto.comwrote:

Quote:

Originally Posted by

"Joey" <joey.pow...@.topscene.comwrote in message

news:1176914556.144456.278850@.b75g2000hsg.googlegr oups.com...

Quote:

Originally Posted by

Hello,


Quote:

Originally Posted by

I am having trouble with session state in my asp.net 1.1 C# web app. I
am trying to program either a popup box warning of expiration, or I
may do a redirect to the home page upon expiration.


Quote:

Originally Posted by

But I can't seem to get started, because I am getting values that I do
not understand. In IIS settings, I stopped my website/app and went
into the properties for it and selected the "Home Directory" tab. Then
I clicked the "Configuration" button and selected the "Options" tab.
Then under the "Application Configuration" group, I verified that the
box for "Enable session state" was checked. Then I changed the value
to "2" (just for testing). I then saved and restarted my website.


I believe these values are for classic ASP, not for ASP.NET.
--

John Saunders [MVP]


>
So how does one set session timeout for asp.net?
>
>


On Apr 18, 12:54 pm, Brad Roberts <BradRoberts56noj...@.hotmail.com>
wrote:

Quote:

Originally Posted by

Use the sessionState entry in Web.Config...
--
Brad
>
"Software is like melted pudding..."
>
>
>
"Joey" wrote:

Quote:

Originally Posted by

On Apr 18, 12:34 pm, "John Saunders [MVP]" <john.saunders at
trizetto.comwrote:

Quote:

Originally Posted by

"Joey" <joey.pow...@.topscene.comwrote in message


>

Quote:

Originally Posted by

Quote:

Originally Posted by

>news:1176914556.144456.278850@.b75g2000hsg.googlegr oups.com...


>

Quote:

Originally Posted by

Quote:

Originally Posted by

Hello,


>

Quote:

Originally Posted by

Quote:

Originally Posted by

I am having trouble with session state in my asp.net 1.1 C# web app. I
am trying to program either a popup box warning of expiration, or I
may do a redirect to the home page upon expiration.


>

Quote:

Originally Posted by

Quote:

Originally Posted by

But I can't seem to get started, because I am getting values that I do
not understand. In IIS settings, I stopped my website/app and went
into the properties for it and selected the "Home Directory" tab. Then
I clicked the "Configuration" button and selected the "Options" tab.
Then under the "Application Configuration" group, I verified that the
box for "Enable session state" was checked. Then I changed the value
to "2" (just for testing). I then saved and restarted my website.


>

Quote:

Originally Posted by

Quote:

Originally Posted by

I believe these values are for classic ASP, not for ASP.NET.
--


>

Quote:

Originally Posted by

Quote:

Originally Posted by

John Saunders [MVP]


>

Quote:

Originally Posted by

So how does one set session timeout for asp.net?- Hide quoted text -


>
- Show quoted text -


Thanks