How to open a page outside an iframe?

G

Guest

Hello,

When I click on a linkbutton of a datagrid on a web form I open another web
form on the same page within an iframe. The page within the iframe has a
datagrid also and when I click on a linkbutton in that datagrid I redirect to
another webform.

The problem I'm having is that this last webform opens within the iframe but
I want it to open on another page outside the iframe.

Any ideas will be appreciated.
 
A

Ashish

you would have to link page inside iframe to post back to the container
page.
this can be done through using parent property in javascript, but
beaware that if pages are in different domains, this would through a
security warning
 
I

intrader

Hello,

When I click on a linkbutton of a datagrid on a web form I open another web
form on the same page within an iframe. The page within the iframe has a
datagrid also and when I click on a linkbutton in that datagrid I redirect to
another webform.

The problem I'm having is that this last webform opens within the iframe but
I want it to open on another page outside the iframe.

Any ideas will be appreciated.
Not possible with IFRAME, I am afraid. However, in your primary page you
could use a form, or the location object, and you have to set the target
to _top.
 
G

Guest

Thanks but I'm afraid I'm new to web development. My html looks like this and
ButtonColumn does not support an onclick event. I don't know how to proceed.

<form ...>
<asp:DataGrid ...>
<Columns>
<asp:BoundColumn ...></asp:BoundColumn>
<asp:BoundColumn ...></asp:BoundColumn>
<asp:ButtonColumn Text="View Visit"
CommandName="visit"></asp:ButtonColumn>
</Columns>
</asp:DataGrid>
</form>
 
G

Guest

Sorry I don't understand. Can you elaborate?

intrader said:
Not possible with IFRAME, I am afraid. However, in your primary page you
could use a form, or the location object, and you have to set the target
to _top.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top