Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to do pop up windows in .NET

Status
Not open for further replies.

bigfoot

Programmer
Joined
May 4, 1999
Messages
1,779
Location
US
Another newbe question...

On my grid, my manager wants to have it when you click on the select button for a row in the grid, to pop up a new editing window.

What this will give us is multiple edit windows at once, with the ability to cut and paste from one to the other.

Each window will have a cancel and an update button. I figured on calling the same code from each with a key pair that will do the update. It should be no problems.

I can do it in javascript but I have not in asp yet. A redirect just gives me a new page but not the pop up type of overlay.
I was looking around and all I saw was javascript but no .net server side stuff for this.

This is an Intranet project, so we control any anti popup code in the browsers.
 
You can't do a pop-up server side. You will have to use javascript. You can use RegisterClientScript() to emit the js to the page.
 
So I'll have to write the javascript in the second window to pop it up as a window when it's called?
Will that work.

I think this manager of mine really wants a desktop app.
 
Actually you want the window to pop-up when you click a button in the grid, correct? Then use the Attribues.Add() method of the button to add an onclick event to the button.

 
Can I still pass data to the popup'd page to read from the database?
 
Thanks for the help.

I read up on how to attach a js to the button but how do you get hold of the Select button to add the js to it?
 
On the rowdatabound event, get a refernce to the button using findcontrol() and then add the js to it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top