473,396 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Creating a pop-up window

Hi,

In the Page_Load sub, can someone tell me what code to place to create a
pop-up window?

Thanks,

Steve
Nov 18 '05 #1
2 1260
Steve,
Remember, the Page_Load event is a server-side event, it won't
actually raise client-side events such as a pop-up. Basically, you'll still
create pop-up windows the same way you did before, with client-side
javascript. You can, of course, cause the server tags that are written by
ASP.Net to contain calls to these functions, but the server events don't
directly call the functions or activate them. For instance: you have a
client-side function called ShowPopUp. You create the Body tag as an
HtmlGenericControl by naming it and adding the runat=server attribute to it.
Then, in the Page_Load you can add an attribute caled OnLoad and set the
value to the attribute to be whatever you would need to call the client-side
pop-up.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"Steve Caliendo" <sc*******@epion.com> wrote in message
news:eM*************@TK2MSFTNGP10.phx.gbl...
Hi,

In the Page_Load sub, can someone tell me what code to place to create a
pop-up window?

Thanks,

Steve

Nov 18 '05 #2
You can open a new window using client side javascript such as this:
a=window.open('SomePage.aspx','MyWindow')
Here's more info:
http://msdn.microsoft.com/workshop/a...ods/open_0.asp

You can use the RegisterClientScriptBlock or RegisterStartupScript
functions to help you output the javascript from your server code, such as
in your Page_Load event.
Here's more info on these:
http://msdn.microsoft.com/library/de...BlockTopic.asp
http://msdn.microsoft.com/library/de...criptTopic.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Mark Fitzpatrick" <ma******@fitzme.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Steve,
Remember, the Page_Load event is a server-side event, it won't
actually raise client-side events such as a pop-up. Basically, you'll still create pop-up windows the same way you did before, with client-side
javascript. You can, of course, cause the server tags that are written by
ASP.Net to contain calls to these functions, but the server events don't
directly call the functions or activate them. For instance: you have a
client-side function called ShowPopUp. You create the Body tag as an
HtmlGenericControl by naming it and adding the runat=server attribute to it. Then, in the Page_Load you can add an attribute caled OnLoad and set the
value to the attribute to be whatever you would need to call the client-side pop-up.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"Steve Caliendo" <sc*******@epion.com> wrote in message
news:eM*************@TK2MSFTNGP10.phx.gbl...
Hi,

In the Page_Load sub, can someone tell me what code to place to create a
pop-up window?

Thanks,

Steve


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Roy Smith | last post by:
In the recent "transforming a list into a string" thread, we've been discussing the fact that list.pop() is O(1), but list.pop(0) is O(n). I decided to do a little timing experiment. To be sure,...
4
by: Andre | last post by:
Hi guys, newbie question. I am having trouble with a script that is supposed to login me to my account on yahoo pop server. When i do this: import getpass, poplib, re POPHOST =...
1
by: spencer | last post by:
Hi, The code. def buildStackMajor(): for node in dirStackMinor: #print 's is the node...', node dirStackMajor.append(node) dirStackMinor.pop() print 'POP the stack...', len(dirStackMinor)...
6
by: Will | last post by:
Hi, Sorry to be a pest... But I can figure this out. I'm pushing to a stack. then I need to check to see if the word is a palindrome. Is the code below correct? if so, how can I check the...
15
by: Stig Brautaset | last post by:
Hi group, I'm playing with a little generic linked list/stack library, and have a little problem with the interface of the pop() function. If I used a struct like this it would be simple: ...
8
by: redeagle | last post by:
I'm wondering what the best practice is for creating a WinApp "wizard" that contains 4 or 5 "steps". Options so far are 1) Single WinForm making various controls visible/non visible at the...
25
by: Nicholas Parsons | last post by:
Howdy Folks, I was just playing around in IDLE at the interactive prompt and typed in dir({}) for the fun of it. I was quite surprised to see a pop method defined there. I mean is that a...
1
by: wishbone34 | last post by:
Below is a postfix eval. program i have made, it works fine, however my professor wants me to make a header file with the class, and I tried this class StackType { public: void...
7
by: Scott | last post by:
As said before I'm new to programming, and I need in depth explaination to understand everything the way I want to know it, call it a personality quirk ;p. With pop() you remove the last element...
8
by: julia_beresford | last post by:
Hi I need to create the following class at runtime: public class MyCollection : CollectionBase { public void Add(MyItem item) { List.Add(item); }
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
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,...
0
tracyyun
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.