473,505 Members | 13,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Redirect to target _parent from codebehind

MB
Hello!

I am using a frameset and vb codebehind to work with a database.
When pressing a delete button in one of my frames, I want the hole application to be refreshed, or at least another of my frames to be refreshed. I don't really understand how to do this.

I tried with response.redirect("Frameset1.htm") but I can't set target frame _parent for this command.
I regular <a href="Frameset1.htm" target="_parent">test</a> would solve my problem, but I want to do this from codebehind and not by letting the user click more than the delete button.

How could I solve this issue?

Regards Magnus
Nov 17 '05 #1
5 7178
Hi,

Use Page RegisterStartupscript to embed javascript that change other
frame src.

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #2
Hi Magnus,

I think you only need call some client side JScript to the refresh the
frames. For example to refresh the whole page (all Frames):

window.parent.location="...."

To refresh a particular frame:

window.parent.frames("FrameID").location="..."

Luke

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026?? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
http://www.microsoft.com/security/se...s/ms03-026.asp and/or to
visit Windows Update at http://windowsupdate.microsoft.com to install the
patch. Running the SCAN program from the Windows Update site will help to
insure you are current with all security patches, not just MS03-026."

Nov 17 '05 #3
MB
Thank you!

Unfortunately I'm not sop familiar with asp.net environment so I wonder how
to call this from a vb codebehind function.

Regards Magnus

"MSFT" <lu******@online.microsoft.com> wrote in message
news:re**************@cpmsftngxa06.phx.gbl...
Hi Magnus,

I think you only need call some client side JScript to the refresh the
frames. For example to refresh the whole page (all Frames):

window.parent.location="...."

To refresh a particular frame:

window.parent.frames("FrameID").location="..."

Luke

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026?? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
http://www.microsoft.com/security/se...s/ms03-026.asp and/or to visit Windows Update at http://windowsupdate.microsoft.com to install the
patch. Running the SCAN program from the Windows Update site will help to
insure you are current with all security patches, not just MS03-026."

Nov 17 '05 #4
Hi Magnus,

You can write the script to client side with RegisterStartupScript for
example:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim strClientScript As String

strClientScript = "<script language=JavaScript> "

strClientScript +=
"window.parent.frames(""AnotherFrame"").location=" "\Another.aspx"" "

strClientScript += " </script>"
Me.RegisterStartupScript("ddd", strClientScript)

End Sub

Luke

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026?? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
http://www.microsoft.com/security/se...s/ms03-026.asp and/or to
visit Windows Update at http://windowsupdate.microsoft.com to install the
patch. Running the SCAN program from the Windows Update site will help to
insure you are current with all security patches, not just MS03-026."

Nov 17 '05 #5
There is no namespace needed. You can refer to its document in MSDN:

http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemwebuipageclassregisterstartupscripttopi c.asp

Luke

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026?? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
http://www.microsoft.com/security/se...s/ms03-026.asp and/or to
visit Windows Update at http://windowsupdate.microsoft.com to install the
patch. Running the SCAN program from the Windows Update site will help to
insure you are current with all security patches, not just MS03-026."

Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1999
by: Jackson | last post by:
Anyone now how to redirect my asp page, from a _top frame to the _parent frame?
9
2280
by: middletree | last post by:
In using a page with IFrame, I woudl like to write a line like this: If (certain criteria met) then response.redirect(somepage.asp) end if Pretty simple, except that I would like to make it...
3
7590
by: Steve | last post by:
I have a page which has some frames. After processing one of the pages I want to redirect to another frameset. However, when I use Response.Redirect I end up with a frameset with the frameset...
2
4041
by: Rob | last post by:
Hi Gang: I have a page that loads a remote page into an IFRAME. I don't have any control over this remote page though the page is owned by the same company I work for. The problem is that all...
1
6024
by: Gerald Shastri | last post by:
Hi, I have a page which is being generated by a CMS and I can't control the links which are being outputted. I want to add a target = "_parent" attribute to all the links on my page using...
9
20775
The1corrupted
by: The1corrupted | last post by:
Alright, I have a meta tag and I'm working with frames, so I want the meta tag to target the good ol' "_parent" put when I put this code in.. <meta http-equiv='refresh' content='0;...
0
5440
by: oopaevah | last post by:
Hi, I have a set of valid xhtml pages that a third party web site is integrating with via an <iframein his own page. This retains his own branding template in the header and footer, with the...
2
1648
by: Chris Marsh | last post by:
All We have a requirement to add a "target" attribute with a value of "_parent" to any links in a given .aspx page, UNLESS a target has already been specified for that link. We are not in...
1
4607
by: =?Utf-8?B?Sko=?= | last post by:
Hi all, I have a help page that I have to (against my better judgement) open up in a new window, which will show the help for the current page the user is on. So in my master page I have a...
0
7213
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7298
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4698
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.