|
-
Oct 21st, 2005, 05:11 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] Response.Redirect() into IFRAME
I have a url string being built based on some dropdownlist values the user picks. When they pick the final dropdownlist value, I have it set to redirect to that url, however I want it to load the page in an IFRAME i have on the page. I know I need to tell it the TARGET, but I'm not sure how to do this without an href link. Here's my code thus far:
VB Code:
Private Sub ddlForm_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ddlForm.SelectedIndexChanged
Dim sSection As String = ddlSection.SelectedItem.Text
Dim sForm As String = ddlForm.SelectedItem.Text
Dim sRedirectPage As String = "Section" & sSection & "/" & sForm & ".aspx"
Response.Redirect(sRedirectPage)
End Sub
I'm kinda stuck after this. Thanks!!
Last edited by drpcken; Oct 22nd, 2005 at 09:08 PM.
-
Oct 22nd, 2005, 11:38 AM
#2
Re: Response.Redirect() into IFRAME
Use Page.RegisterStartupScript to change the IFRAME's location...
The javascript you need is
frames['myiframename'].location.href = 'http://www.mendhak.com/';
-
Oct 22nd, 2005, 08:37 PM
#3
Thread Starter
Fanatic Member
Re: Response.Redirect() into IFRAME
ahhh i see. But I've searched for Page.RegisterStartupScript all over and cant' find what i'm looking for. Do I put Page.RegisterStartupScript in my page that CONTAINS the IFRAME, or the IFRAME itself?
-
Oct 22nd, 2005, 09:07 PM
#4
Thread Starter
Fanatic Member
Re: Response.Redirect() into IFRAME
Ahhhhh nevermind, i figured it out.
Thanks for the shove in the right direction Mendhak!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|