I want to popup a window from my codebehind. The reason is that during
the postback the code needs to do some validations and to build the
arguments that are passed in the url. How can I achieve this
functionality?
The reason I do not want to use Response.Redire ct is because when the
user comes back to the first page, all the selections that were
made(which are the arguments) disappear. 9 3913
there is no way to do that directly from code-behind, it has to pass to a
clientside call
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Rathtap" <am****@yahoo.c om> wrote in message
news:b2******** *************** ***@posting.goo gle.com... I want to popup a window from my codebehind. The reason is that during the postback the code needs to do some validations and to build the arguments that are passed in the url. How can I achieve this functionality? The reason I do not want to use Response.Redire ct is because when the user comes back to the first page, all the selections that were made(which are the arguments) disappear.
I saw Frank Gimberg do something similar to this in a demo once a year or
two ago. You can contact him at fr***@prosoft-sys.com
"Rathtap" <am****@yahoo.c om> wrote in message
news:b2******** *************** ***@posting.goo gle.com... I want to popup a window from my codebehind. The reason is that during the postback the code needs to do some validations and to build the arguments that are passed in the url. How can I achieve this functionality? The reason I do not want to use Response.Redire ct is because when the user comes back to the first page, all the selections that were made(which are the arguments) disappear.
while you can emit javascript to do this, any popup blocker will stop it.
-- bruce (sqlwork.com)
"Rathtap" <am****@yahoo.c om> wrote in message
news:b2******** *************** ***@posting.goo gle.com... I want to popup a window from my codebehind. The reason is that during the postback the code needs to do some validations and to build the arguments that are passed in the url. How can I achieve this functionality? The reason I do not want to use Response.Redire ct is because when the user comes back to the first page, all the selections that were made(which are the arguments) disappear.
You have a couple of options. One is to generate a JavaScript that opens the
new window. As has been pointed out, popup blockers will stop it. However,
another approach (also using JavaScript) is to programmaticall y click a
(hidden) hyperlink that opens in a new window, thus avoiding the popup
blockers. However, you wil have no control over the new window's size and
configuration.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
"Rathtap" <am****@yahoo.c om> wrote in message
news:b2******** *************** ***@posting.goo gle.com... I want to popup a window from my codebehind. The reason is that during the postback the code needs to do some validations and to build the arguments that are passed in the url. How can I achieve this functionality? The reason I do not want to use Response.Redire ct is because when the user comes back to the first page, all the selections that were made(which are the arguments) disappear.
Forgive me. I spoke too quickly Upon reflection, I realized that JavaScript
can't click a hyperlink. Oh well. I can't think of any other way to open a
new browser window that won't be foiled by popup blockers. Best to try
another route.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
"bruce barker" <no***********@ safeco.com> wrote in message
news:ed******** ******@TK2MSFTN GP15.phx.gbl... while you can emit javascript to do this, any popup blocker will stop it.
-- bruce (sqlwork.com)
"Rathtap" <am****@yahoo.c om> wrote in message news:b2******** *************** ***@posting.goo gle.com... I want to popup a window from my codebehind. The reason is that during the postback the code needs to do some validations and to build the arguments that are passed in the url. How can I achieve this functionality? The reason I do not want to use Response.Redire ct is because when the user comes back to the first page, all the selections that were made(which are the arguments) disappear.
Kevin,
This has been bother me for quite awhile.
Why does my code for a pop-up window from my app not get blocked by IE SP2
pop-up blocker or the Google toolbar? (Yet some other pop-up blockers that
my users have installed does block it)
(No exceptions have been made in IE's Pop-up blocker settings either)
Private Function openNewWindow(B yVal url As String, ByVal windowName As
String, ByVal features As String) As String
' url parameter must be enclosed in single quotes!!!
Dim sb As System.Text.Str ingBuilder = New System.Text.Str ingBuilder
sb.Append("java script:var " & windowName & " = window.open(" + url +
",'" + windowName + "','" & features + "');" & windowName & ".focus();" )
Return sb.ToString()
End Function
The code is not really important here. I think I might be missing the big
picture; are pop-up allowed if they are user initiated. (i.e. a user click a
hyperlink that causes the pop-up)?
BTW, here is a great link I saw yesterday to encapsulate creating a pop-up
into a class: http://www.dotnet2themax.com/ShowCon...9-6f952f31491a
Greg
"Kevin Spencer" <ks******@takem pis.com> wrote in message
news:Oe******** *****@TK2MSFTNG P11.phx.gbl... Forgive me. I spoke too quickly Upon reflection, I realized that JavaScript can't click a hyperlink. Oh well. I can't think of any other way to open a new browser window that won't be foiled by popup blockers. Best to try another route.
-- HTH, Kevin Spencer .Net Developer Microsoft MVP I get paid good money to solve puzzles for a living
"bruce barker" <no***********@ safeco.com> wrote in message news:ed******** ******@TK2MSFTN GP15.phx.gbl... while you can emit javascript to do this, any popup blocker will stop it.
-- bruce (sqlwork.com)
"Rathtap" <am****@yahoo.c om> wrote in message news:b2******** *************** ***@posting.goo gle.com... > I want to popup a window from my codebehind. The reason is that during > the postback the code needs to do some validations and to build the > arguments that are passed in the url. How can I achieve this > functionality? > The reason I do not want to use Response.Redire ct is because when the > user comes back to the first page, all the selections that were > made(which are the arguments) disappear.
It's not a popup if the user clicked it, it's a link. Popups are usually
designated as loaded from within the page without the user instructing it to
do so.
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Greg Burns" <greg_burns@DON T_SPAM_ME_hotma il.com> wrote in message
news:O7******** ******@TK2MSFTN GP15.phx.gbl... Kevin,
This has been bother me for quite awhile.
Why does my code for a pop-up window from my app not get blocked by IE SP2 pop-up blocker or the Google toolbar? (Yet some other pop-up blockers that my users have installed does block it)
(No exceptions have been made in IE's Pop-up blocker settings either)
Private Function openNewWindow(B yVal url As String, ByVal windowName As String, ByVal features As String) As String
' url parameter must be enclosed in single quotes!!!
Dim sb As System.Text.Str ingBuilder = New System.Text.Str ingBuilder sb.Append("java script:var " & windowName & " = window.open(" + url + ",'" + windowName + "','" & features + "');" & windowName & ".focus();" )
Return sb.ToString() End Function
The code is not really important here. I think I might be missing the big picture; are pop-up allowed if they are user initiated. (i.e. a user click a hyperlink that causes the pop-up)?
BTW, here is a great link I saw yesterday to encapsulate creating a pop-up into a class:
http://www.dotnet2themax.com/ShowCon...9-6f952f31491a
Greg
"Kevin Spencer" <ks******@takem pis.com> wrote in message news:Oe******** *****@TK2MSFTNG P11.phx.gbl... Forgive me. I spoke too quickly Upon reflection, I realized that JavaScript can't click a hyperlink. Oh well. I can't think of any other way to open a new browser window that won't be foiled by popup blockers. Best to try another route.
-- HTH, Kevin Spencer .Net Developer Microsoft MVP I get paid good money to solve puzzles for a living
"bruce barker" <no***********@ safeco.com> wrote in message news:ed******** ******@TK2MSFTN GP15.phx.gbl... while you can emit javascript to do this, any popup blocker will stop it.
-- bruce (sqlwork.com)
"Rathtap" <am****@yahoo.c om> wrote in message news:b2******** *************** ***@posting.goo gle.com... > I want to popup a window from my codebehind. The reason is that during > the postback the code needs to do some validations and to build the > arguments that are passed in the url. How can I achieve this > functionality? > The reason I do not want to use Response.Redire ct is because when the > user comes back to the first page, all the selections that were > made(which are the arguments) disappear.
I don't think I expressed myself well.
For example, I have button (being a hyperlink button or push button) in a
datagrid. When the user selects it, is causes a postback. In the post back
code, I am building js window.open function that I append to the output of
the page with Page.RegisterSt artupScript. (I am dynamically building the
querystring). How does/should a pop-up blocker treat this situation? My
pop-up blockers are allowing it, some or not.
Greg
"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:uZ******** ******@TK2MSFTN GP15.phx.gbl... It's not a popup if the user clicked it, it's a link. Popups are usually designated as loaded from within the page without the user instructing it to do so.
-- Curt Christianson Owner/Lead Developer, DF-Software Site: http://www.Darkfalz.com Blog: http://blog.Darkfalz.com
"Greg Burns" <greg_burns@DON T_SPAM_ME_hotma il.com> wrote in message news:O7******** ******@TK2MSFTN GP15.phx.gbl... Kevin,
This has been bother me for quite awhile.
Why does my code for a pop-up window from my app not get blocked by IE SP2 pop-up blocker or the Google toolbar? (Yet some other pop-up blockers that my users have installed does block it)
(No exceptions have been made in IE's Pop-up blocker settings either)
Private Function openNewWindow(B yVal url As String, ByVal windowName As String, ByVal features As String) As String
' url parameter must be enclosed in single quotes!!!
Dim sb As System.Text.Str ingBuilder = New System.Text.Str ingBuilder sb.Append("java script:var " & windowName & " = window.open(" + url + ",'" + windowName + "','" & features + "');" & windowName & ".focus();" )
Return sb.ToString() End Function
The code is not really important here. I think I might be missing the big picture; are pop-up allowed if they are user initiated. (i.e. a user click a hyperlink that causes the pop-up)?
BTW, here is a great link I saw yesterday to encapsulate creating a pop-up into a class:
http://www.dotnet2themax.com/ShowCon...9-6f952f31491a
Greg
"Kevin Spencer" <ks******@takem pis.com> wrote in message news:Oe******** *****@TK2MSFTNG P11.phx.gbl... Forgive me. I spoke too quickly Upon reflection, I realized that JavaScript can't click a hyperlink. Oh well. I can't think of any other way to open a new browser window that won't be foiled by popup blockers. Best to try another route.
-- HTH, Kevin Spencer .Net Developer Microsoft MVP I get paid good money to solve puzzles for a living
"bruce barker" <no***********@ safeco.com> wrote in message news:ed******** ******@TK2MSFTN GP15.phx.gbl... while you can emit javascript to do this, any popup blocker will stop it.
-- bruce (sqlwork.com)
"Rathtap" <am****@yahoo.c om> wrote in message news:b2******** *************** ***@posting.goo gle.com... > I want to popup a window from my codebehind. The reason is that > during > the postback the code needs to do some validations and to build the > arguments that are passed in the url. How can I achieve this > functionality? > The reason I do not want to use Response.Redire ct is because when the > user comes back to the first page, all the selections that were > made(which are the arguments) disappear.
Hi Gregg,
Windows XP Service Pack 2 includes a Popup blocker. I can't tell you
anything about other popup blockers, but here is all the info about Windows
XP Service Pack 2 for developers: http://msdn.microsoft.com/security/p...2/default.aspx
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
"Greg Burns" <greg_burns@DON T_SPAM_ME_hotma il.com> wrote in message
news:#i******** ******@TK2MSFTN GP15.phx.gbl... I don't think I expressed myself well.
For example, I have button (being a hyperlink button or push button) in a datagrid. When the user selects it, is causes a postback. In the post
back code, I am building js window.open function that I append to the output of the page with Page.RegisterSt artupScript. (I am dynamically building the querystring). How does/should a pop-up blocker treat this situation? My pop-up blockers are allowing it, some or not.
Greg
"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message news:uZ******** ******@TK2MSFTN GP15.phx.gbl... It's not a popup if the user clicked it, it's a link. Popups are usually designated as loaded from within the page without the user instructing
it to do so.
-- Curt Christianson Owner/Lead Developer, DF-Software Site: http://www.Darkfalz.com Blog: http://blog.Darkfalz.com
"Greg Burns" <greg_burns@DON T_SPAM_ME_hotma il.com> wrote in message news:O7******** ******@TK2MSFTN GP15.phx.gbl... Kevin,
This has been bother me for quite awhile.
Why does my code for a pop-up window from my app not get blocked by IE SP2 pop-up blocker or the Google toolbar? (Yet some other pop-up blockers that my users have installed does block it)
(No exceptions have been made in IE's Pop-up blocker settings either)
Private Function openNewWindow(B yVal url As String, ByVal windowName As String, ByVal features As String) As String
' url parameter must be enclosed in single quotes!!!
Dim sb As System.Text.Str ingBuilder = New System.Text.Str ingBuilder sb.Append("java script:var " & windowName & " = window.open(" +
url + ",'" + windowName + "','" & features + "');" & windowName & ".focus();" )
Return sb.ToString() End Function
The code is not really important here. I think I might be missing the big picture; are pop-up allowed if they are user initiated. (i.e. a
user click a hyperlink that causes the pop-up)?
BTW, here is a great link I saw yesterday to encapsulate creating a pop-up into a class:
http://www.dotnet2themax.com/ShowCon...9-6f952f31491a Greg
"Kevin Spencer" <ks******@takem pis.com> wrote in message news:Oe******** *****@TK2MSFTNG P11.phx.gbl... Forgive me. I spoke too quickly Upon reflection, I realized that JavaScript can't click a hyperlink. Oh well. I can't think of any other way to
open a new browser window that won't be foiled by popup blockers. Best to try another route.
-- HTH, Kevin Spencer .Net Developer Microsoft MVP I get paid good money to solve puzzles for a living
"bruce barker" <no***********@ safeco.com> wrote in message news:ed******** ******@TK2MSFTN GP15.phx.gbl... > while you can emit javascript to do this, any popup blocker will stop > it. > > -- bruce (sqlwork.com) > > > "Rathtap" <am****@yahoo.c om> wrote in message > news:b2******** *************** ***@posting.goo gle.com... > > I want to popup a window from my codebehind. The reason is that > > during > > the postback the code needs to do some validations and to build the > > arguments that are passed in the url. How can I achieve this > > functionality? > > The reason I do not want to use Response.Redire ct is because when
the> > user comes back to the first page, all the selections that were > > made(which are the arguments) disappear. > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Noozer |
last post by:
When using the WebBrowser control, is it possible to cause popup windows to
appear within the WebBrowser control itself instead of a new window?
This is what I've written in the NewWindow2 event, but I can't figure out
how to get the popup to appear in the same browser window.
In this code the user is presented with "Yes", "No" or "Cancel". Yes allows
the popup to spawn a window, No should load the popup in the same window and
Cancel...
|
by: Applebrownbetty |
last post by:
Hi,
I'd like to append/amend the following code from the Dreamweaver extension
"Open Picture Window Fever" for the ability to center the PopUp window:
By default, it allows the window to be offset on the left and top, but does
not include a centering option.
I'm thinking it would include something like (screen.width-imageWidth)/2;
somewhere but not sure how do go about doing this.
|
by: E Michael Brandt |
last post by:
I have been lurking here for some time, and now would like to ask a
question of you clever coders:
My JustSo PictureWindow 3 Extension for Dreamweaver has stumbled in the
face of the new Opera 8. Jspw3 opens a popup window (using
varname=window.open(...)) but there are now two problems:
1) Opera8 interprets a top,left of 0,0 to be top left of the browser
window rather than of the entire screen, unlike the other modern
browsers I've...
|
by: Davey |
last post by:
I have a website which has a popup window (this only opens when the user
chooses to open it). In the popup window I have a <select> control which
lists a selection of "classes". Each class has a description and a class_id
(stored in the value attribute of each option). The user will then select a
class from the drop-down list.
What I want to do is have a control in the parent browser window which can
store the class_id and the...
|
by: GrantS |
last post by:
I am having a problem closing a popup window opened modally. When I
try to close the window (when the user hits save button and the data
has been processed), the Popup window opens as a full screen as a new
window. The original window plus the Modally opened Pop remain in a
separate window.
What I want to do is close the popup and return to the original window
with its view state maintained.
The control use to fire the popup window...
| |
by: Ingeborg |
last post by:
Hi.
Is it possible to create a popup window (or something
similar) from codebehind?
Like after pressing a button and if som conditions is true?
Thanks in advance.
Ingeborg
|
by: Paul Ross |
last post by:
Is there a way to open a popup window with a specific location relative to
the parent window. For example, centered on the parent window, or near a
specific control on the parent window.
It seems like there should be a way to do this.
Paul
"It was I who allowed the alliance to learn the location of the shield
generator. It is quite safe from your pitiful band."
|
by: Drew Berkemeyer |
last post by:
Hello,
We have an application that we have written using ASP.NET. On one of our
pages we open a popup window using javascript. The popup window has a save
and a cancel button. Both of them are server-side controls and do a
postback. While processing on the server we add javascript to the page load
(i.e. onload=window.opener.focus(); window.close()). However, the
window.close() command does not close the IE popup window.
This happens...
|
by: anthony.turcotte |
last post by:
Hi,
I've looked for a solution to this problem on google, read posts in
this newsgroup and I still haven't found anything that could help me.
Here's the scenario.
1. User accesses pageA.html
2. User clicks on menu link to open popup.html
3. pageA.html checks if popup.html is already open. It is not, open
|
by: V S Rawat |
last post by:
using Javascript, I am opening a web-based url in a popup window.
MyWin1=Window.Open(url, "mywindow")
There is a form (form1) in the url in that popup window, I need to
submit that form.
How do I submit that form1 from the javascript from my current window?
Thanks.
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |