By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,190 Members | 765 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,190 IT Pros & Developers. It's quick & easy.

opening parametrized window in asp.net without post back-Help required!

P: n/a
Hi,
I am an ASP.net newbie.
I am writing a user control that is made up of datagrid with one of
the columns opening a new window to display some details on click of
the set image.
I have basically used ImageButton server control.
The problem is because I have used a server control with
runat="server",the parent page is posted back and even though the
window opens up,the focus gets set to the parent window.
What I want is,the new window should open and the focus should remain
on that window and not the parent window.

I have tried writing javascript to deal with the situation but wasn't
able to achieve what I wanted.

The only thing that comes to my mind is to avoid posting back onclick.

The trouble there is the URL to be used for opening the window has
three parameters and their values come from the server side code.
Please could somebody suggest what can be done so that the focus stays
on the newly opened window.
Many thanks in advance.

Keshav
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Keshav Gadia wrote:
Hi,
I am an ASP.net newbie.
I am writing a user control that is made up of datagrid with one of
the columns opening a new window to display some details on click of
the set image.
I have basically used ImageButton server control.
The problem is because I have used a server control with
runat="server",the parent page is posted back and even though the
window opens up,the focus gets set to the parent window.
What I want is,the new window should open and the focus should remain
on that window and not the parent window.

I have tried writing javascript to deal with the situation but wasn't
able to achieve what I wanted.

The only thing that comes to my mind is to avoid posting back onclick.

The trouble there is the URL to be used for opening the window has
three parameters and their values come from the server side code.
Please could somebody suggest what can be done so that the focus stays
on the newly opened window.
Many thanks in advance.

Keshav

If you really want to use image, then you need a template column and in
this template column put your image in a hyperlink and in this hyperlink
you can put your target as _new and "ta taaaa". The bottom line is,
don't use server control if you don't want to have this case.

--

SevDer
http://www.sevder.com
Nov 18 '05 #2

P: n/a
SevDer <do****@sevder.com> wrote in message news:<uW**************@TK2MSFTNGP15.phx.gbl>...
Keshav Gadia wrote:
Hi,
I am an ASP.net newbie.
I am writing a user control that is made up of datagrid with one of
the columns opening a new window to display some details on click of
the set image.
I have basically used ImageButton server control.
The problem is because I have used a server control with
runat="server",the parent page is posted back and even though the
window opens up,the focus gets set to the parent window.
What I want is,the new window should open and the focus should remain
on that window and not the parent window.

I have tried writing javascript to deal with the situation but wasn't
able to achieve what I wanted.

The only thing that comes to my mind is to avoid posting back onclick.

The trouble there is the URL to be used for opening the window has
three parameters and their values come from the server side code.
Please could somebody suggest what can be done so that the focus stays
on the newly opened window.
Many thanks in advance.

Keshav

If you really want to use image, then you need a template column and in
this template column put your image in a hyperlink and in this hyperlink
you can put your target as _new and "ta taaaa". The bottom line is,
don't use server control if you don't want to have this case.


Hi Ahmet,

many thanks for you suggestion.It worked.
Basically,image Button does an autopost whereas an hyperlink doesn't
post to the server.Nice one!

Thanks again.

Cheers
Keshav
Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.