473,654 Members | 3,078 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PopUP Window

70 New Member
Hi

Anyone help me.I need a popup window when i click button.


When i click button it show the popup window with employee code from database table.

I used ASP.net(C#) with sqlserver


Pls help me
Its urgent for my project.


Regards
Shalini
May 30 '08 #1
5 1201
Curtis Rutland
3,256 Recognized Expert Specialist
Any popups would have to be created with a client side script, not ASP.NET. ASP.NET runs on the server. To get the javascript you need to create a popup window, try here (first google result for javascript popup window).

What you should do is create the page that you want to appear in the popup window. Have it use a querystring (Request.QueryS tring["key"];) to pass on the key value(s) to select against from your database table.\

Hi

Anyone help me.I need a popup window when i click button.


When i click button it show the popup window with employee code from database table.

I used ASP.net(C#) with sqlserver


Pls help me
Its urgent for my project.


Regards
Shalini
May 30 '08 #2
shalini166
70 New Member
Thank u very much for ur reply.

I got the window.Onpage load of the popwindow i load employee id.I want to select the id from the pop up window ,based on the id all the details of that particular id will display in lots textbox.


I want to know how to select item from the popup window.

pls help me.
May 30 '08 #3
kunal pawar
297 Contributor
do you mean, you want to take value from Child window ?
May 30 '08 #4
shalini166
70 New Member
yes In my child window there is one list box containing employee id.when i select any one employee id from child window,it should display in my parent window.
May 30 '08 #5
Frinavale
9,735 Recognized Expert Moderator Expert
Hi

Anyone help me.I need a popup window when i click button.


When i click button it show the popup window with employee code from database table.

I used ASP.net(C#) with sqlserver


Pls help me
Its urgent for my project.


Regards
Shalini
You need to apply JavaScript to the button so that it opens the ASPX page that displays your employee in a new window.

The JavaScript to do this is the following:
Expand|Select|Wrap|Line Numbers
  1. window.open("nameOfAspxPage.aspx","nameOfWindow", "toolbar=yes,menubar=yes, width=980, height=700, resizable=yes,scrollbars=yess")
  2.  

You need to call this JavaScript code on the Client Side onclick event.
So you need to add it to your button's attributes:

VB:
Expand|Select|Wrap|Line Numbers
  1. theButtonThatOpensTheWindow.Attributes.Add("onclick","javascript:window.open("""+"nameOfAspxPage.aspx"""+","""+"nameOfWindow"""+", """+"toolbar=yes,menubar=yes, width=980, height=700, resizable=yes,scrollbars=yes"""+"); return false;")
  2.  
C#:
Expand|Select|Wrap|Line Numbers
  1. theButtonThatOpensTheWindow.Attributes.Add("onclick","javascript:window.open(\"nameOfAspxPage.aspx\",\"nameOfWindow\", \"toolbar=yes,menubar=yes, width=980, height=700, resizable=yes,scrollbars=yes\"); return false;")
  2.  
Please note that I added a "return false" after the window.open() method call. This prevents the ASPX button from posting back to the server.

Cheers

-Frinny
May 30 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
18307
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...
2
4363
by: Moon | last post by:
Seems I still haven't got the hang of all those window generating code in Javascript. I've got a page with about 15 photo thumbnails. When you click on a thumbnail a new window pops up which shows the enlarged version of said thumbnail. This works fine on all current browsers I've tested. However, in case I do not close the popup but click on another thumbnail instead, only IE replaces the enlarged pic by the new one, Firebird and Opera...
5
3963
by: Obantec Support | last post by:
Hi i leached some code and strung together a popup i need for a page with 5 help buttons. Now i could use 5 scripts and pre-load the values but i would rather get a better understanding of how to pass some extra values to 1 script. 1. <SCRIPT LANGUAGE="Javascript"><!-- function popUp(url) {
38
5047
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find out what i'm doing wrong, and so far it seems i'm doing it the right way. Here's my code...any suggestions would be appreciated. <script language="javascript"> <!-- window.open("256fx/index.htm", "", "height=400, width=600"); //-->
7
3213
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...
15
18729
by: | last post by:
So many websites can get around my Googlebar's popup blockers. Even Opera 8 can not stop those popups. I looked into the codes, and I can find nothing showing me how it is done. Can anyone help me find what how it is done? First go to http://www.sitepoint.com/forums/showthread.php?t=184025&page=1&pp=25 Click on Last ? on the page
4
22187
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...
3
1988
by: ypress | last post by:
Hi. I have a page that contains this simple function: <script language="javascript"> function openPop(url, name, w, h) { var features = ""; features += "scrollbars=no,"; features += "menubar=no,"; features += "resizable=no,";
4
34857
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...
7
3660
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
0
8285
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,...
0
8706
jinu1996
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...
0
8591
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 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...
1
6160
isladogs
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...
0
5621
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();...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4293
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2709
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
1
1915
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.