| Author: Atal Bihari Upadhyay 19 Oct 2004 | Member Level: Gold Points : 0 |
Very good article. Keep it up.
|
| Author: Santhosh John W 20 Oct 2004 | Member Level: Bronze Points : 0 |
Nice stuff
|
| Author: Ammar Ahmed Siddiqui 21 Oct 2004 | Member Level: Silver Points : 0 |
Was looking for this thing. Thanks Ammar
|
| Author: Anjali Shah 21 Nov 2004 | Member Level: Silver Points : 0 |
Short but very useful.
|
| Author: Pradeep 29 Nov 2004 | Member Level: Bronze Points : 0 |
hi rajeev, I tried to use the code u suggested and i have noticed that i have to click the button control twice for the page to be opened in a new window because the first time the control is clicked it assigns the OnClick event that is written in code behind. how to achieve the functionality in a single click rather than in 2 clicks?
my prob:
i have a datagrid with multiple rows each row is having a check box. when the user selects a check box for a row and clicks a button i want to open a new window and display the new page for each row selected. how to do this?
Thank you,
--Pradeep
|
| Author: Andy Starzomski 10 Dec 2004 | Member Level: Bronze Points : 0 |
On the web page where the buttons appear I have initialized the OpenNewWindow class by sending the proper parameters. Once this was done I only had to click the button once inorder for the new window to open, otherwise I had to click it twice. I hope this helps
Andy
|
| Author: Uncle Buck 15 Dec 2004 | Member Level: Bronze Points : 0 |
There is a much simpler way of doing this. In the creator method of your extended web control class (such as "MyImageButton") just put a single line of code as follows:
Attributes.Add("openWindow('http://www.mysite.com','MyTitle','640','480');
Makes sense to keep your code clean. Now, you just decalre your image button to be of type "MyImageButton" and all done.
|
| Author: Joriz 25 Dec 2004 | Member Level: Bronze Points : 0 |
this is a good one. but is there anyway to remove address bars, toolbars menus?? and pass the height and width of the new window. thanks.
|
| Author: vishal 05 Jan 2005 | Member Level: Gold Points : 0 |
Very short and effective code. there is no need to CLICK Twice u just need to change a little: add attributes of button_click when the page loads. than it will work with single click
|
| Author: Jex H 31 Jan 2005 | Member Level: Bronze Points : 0 |
Hi All,
Has anyone been able to get around the double clicking to open new window?
I have tried to set the attributes at Page Load event as shown
btnFind.Attributes.Add("OnClick", "Clientscript")
where Clientscript is
Clientscript = "window.open('" & strUrl & "')"
This method does not work or have I miss something.
Thanks.
|
| Author: vishal 01 Feb 2005 | Member Level: Gold Points : 0 |
just put following into page load: Dim str As String = "fullimage.aspx?id=" & prodid & "" 'opennewwindow is function with 2 values (string(str) 'and control(button1)) Opennewwindow(Button1, str) after registering when button1's click event write the code: Dim str As String = "fullimage.aspx?id=" & prodid & "" Opennewwindow(Button1, str)
it will work with a single click
|
| Author: vishal 01 Feb 2005 | Member Level: Gold Points : 0 |
just put following into page load: Dim str As String = "fullimage.aspx?id=" & prodid & "" 'opennewwindow is function with 2 values (string(str) 'and control(button1)) Opennewwindow(Button1, str) after registering when button1's click event write the code: Dim str As String = "fullimage.aspx?id=" & prodid & "" Opennewwindow(Button1, str)
it will work with a single click
|