I have a site that uses frames. I made an aspx form with an asp:button
control with Onclick=test. The test sub is:
Sub Test(ByVal sender As Object, ByVal e As System.EventArg s)
Response.Redire ct("http://webserver/policies/pppindex.htm target=_blank")
End Sub
Of course, this will not work. Is there some way I can get a similar result
without using normal HTML? I don't want the page to load within the frame as
it would if I wrote it
response.redire ct( http://webserver/policies/pppindex.htm)
Thanks for your help.
Jim 5 3569
Hi Jim,
A little about HTTP:
A Response is a response to a Request. The Request comes from a browser
instance on the client. A FrameSet has multiple browser instances. When a
frame (browser instance) sends a Request, the Response is sent back to the
same client browser instance (of course). That means that Response.Redire ct,
which is a Response to a Request, is a Response to a Request from a certain
browser instance. Targeting a frame therefore, can only be done on the
client, as that is where the frames are linked by the parent browser.
What I would do is to add some JavaScript to the Response, which changes the
target frame's document.locati on property to the URL you want loaded into
that frame. That is, as the Response will come back to the browser instance
that sent the Request, it can refresh the page, and add a javascript to it,
something like the following:
<script type="text/javascript"><!--
parent.frameNam e.location = "url";
// -></script>
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
"Jim in Arizona" <ti*******@hotm ail.com> wrote in message
news:%2******** **********@tk2m sftngp13.phx.gb l... I have a site that uses frames. I made an aspx form with an asp:button control with Onclick=test. The test sub is:
Sub Test(ByVal sender As Object, ByVal e As System.EventArg s)
Response.Redire ct("http://webserver/policies/pppindex.htm target=_blank")
End Sub
Of course, this will not work. Is there some way I can get a similar result without using normal HTML? I don't want the page to load within the frame as it would if I wrote it response.redire ct(http://webserver/policies/pppindex.htm)
Thanks for your help. Jim
"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. .. Hi Jim,
A little about HTTP:
A Response is a response to a Request. The Request comes from a browser instance on the client. A FrameSet has multiple browser instances. When a frame (browser instance) sends a Request, the Response is sent back to the same client browser instance (of course). That means that Response.Redire ct, which is a Response to a Request, is a Response to a Request from a certain browser instance. Targeting a frame therefore, can only be done on the client, as that is where the frames are linked by the parent browser.
What I would do is to add some JavaScript to the Response, which changes the target frame's document.locati on property to the URL you want loaded into that frame. That is, as the Response will come back to the browser instance that sent the Request, it can refresh the page, and add a javascript to it, something like the following:
<script type="text/javascript"><!-- parent.frameNam e.location = "url"; // -></script>
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer Neither a follower nor a lender be.
------snip------
I should have known better. Of course, I was hopeful in some way that there
would be some simple soulution.
I have not worked with javascipt (enough) and I'm still pretty new to vb
(newer to vb.net). I wouldn't know how to implement a script like that in
any fashion.
My normal html link from before was <a href="/policies/pppindex.htm"
target=_top>lin k here</a>, which of course removed all frames and loaded the
single htm page in place of the frames. When you say
parent.framenam e.location, I don't know what portion of that is referring to
what part of my standard link.
Would there be some other way of writing the Test Subprocedure to make my
pretty graphical button work, or am I forced to use standard HTML or
javascript?
Thanks for your help Kevin.
Jim
Hi JJim, My normal html link from before was <a href="/policies/pppindex.htm" target=_top>lin k here</a>, which of course removed all frames and loaded the single htm page in place of the frames. When you say parent.framenam e.location, I don't know what portion of that is referring to what part of my standard link.
Well, you could always have a regular link that goes to:
/policies/ppindex.htm target=frameNam e
....where "frameName" is the name of the frame you want loaded.
I have not worked with javascipt (enough) and I'm still pretty new to vb (newer to vb.net). I wouldn't know how to implement a script like that in any fashion.
Just one last comment: Every programmer runs into a situation in which
he/she has "not worked with " some technology, language, or other, from time
to time. The way you improve is to research the new thing when you run into
it, rather than running away from it. Just a couple of weeks ago I had the
task of adding water to a 3-D terrain mapping engine. I found the National
Land Cover Data Set on the USGS web site, but that was only the beginning.
The data was stored in GeoTiffs, which is a specialized form of Tiff file.
To make it worse, it was stored in Albers Equal Araeqa Conical projection.
Now, I knew nothing about parsing Tiff files, much less deriving Lat/Long
information from a raster image with Albers Equal Area Conical projection.
But I do now! ;-)
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
"Jim in Arizona" <ti*******@hotm ail.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. .. "Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message news:%2******** ********@TK2MSF TNGP15.phx.gbl. .. Hi Jim,
A little about HTTP:
A Response is a response to a Request. The Request comes from a browser instance on the client. A FrameSet has multiple browser instances. When a frame (browser instance) sends a Request, the Response is sent back to the same client browser instance (of course). That means that Response.Redire ct, which is a Response to a Request, is a Response to a Request from a certain browser instance. Targeting a frame therefore, can only be done on the client, as that is where the frames are linked by the parent browser.
What I would do is to add some JavaScript to the Response, which changes the target frame's document.locati on property to the URL you want loaded into that frame. That is, as the Response will come back to the browser instance that sent the Request, it can refresh the page, and add a javascript to it, something like the following:
<script type="text/javascript"><!-- parent.frameNam e.location = "url"; // -></script>
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer Neither a follower nor a lender be. ------snip------
I should have known better. Of course, I was hopeful in some way that there would be some simple soulution.
I have not worked with javascipt (enough) and I'm still pretty new to vb (newer to vb.net). I wouldn't know how to implement a script like that in any fashion.
My normal html link from before was <a href="/policies/pppindex.htm" target=_top>lin k here</a>, which of course removed all frames and loaded the single htm page in place of the frames. When you say parent.framenam e.location, I don't know what portion of that is referring to what part of my standard link.
Would there be some other way of writing the Test Subprocedure to make my pretty graphical button work, or am I forced to use standard HTML or javascript?
Thanks for your help Kevin.
Jim
"Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message
news:ez******** *****@TK2MSFTNG P15.phx.gbl... Hi JJim,
My normal html link from before was <a href="/policies/pppindex.htm" target=_top>lin k here</a>, which of course removed all frames and loaded the single htm page in place of the frames. When you say parent.framenam e.location, I don't know what portion of that is referring to what part of my standard link.
Well, you could always have a regular link that goes to:
/policies/ppindex.htm target=frameNam e
...where "frameName" is the name of the frame you want loaded.
I have not worked with javascipt (enough) and I'm still pretty new to vb (newer to vb.net). I wouldn't know how to implement a script like that in any fashion.
Just one last comment: Every programmer runs into a situation in which he/she has "not worked with " some technology, language, or other, from time to time. The way you improve is to research the new thing when you run into it, rather than running away from it. Just a couple of weeks ago I had the task of adding water to a 3-D terrain mapping engine. I found the National Land Cover Data Set on the USGS web site, but that was only the beginning. The data was stored in GeoTiffs, which is a specialized form of Tiff file. To make it worse, it was stored in Albers Equal Araeqa Conical projection. Now, I knew nothing about parsing Tiff files, much less deriving Lat/Long information from a raster image with Albers Equal Area Conical projection. But I do now! ;-)
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer Neither a follower nor a lender be.
Thanks for the insight.
I think I'm still a few days off before I open a book or pdf doc on parsing
Tiff files stored in Albers Equal Areqa Conical Projection. I tried to say
that three, then just two times fast and I couldn't do it! :)
I'll keep working on a solution. Depending on what I finally implement, I'll
let you know how it turned out. Should be amusing, and maybe informative, in
any case! :)
Jim
> I'll keep working on a solution. Depending on what I finally implement, I'll let you know how it turned out. Should be amusing, and maybe informative, in any case! :)
There you go man!
BTW, I misspelled "Area" - it should read "Albers Equal Area Conical
projection." For whatever that's worth!
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
"Jim in Arizona" <ti*******@hotm ail.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. "Kevin Spencer" <ke***@DIESPAMM ERSDIEtakempis. com> wrote in message news:ez******** *****@TK2MSFTNG P15.phx.gbl... Hi JJim,
My normal html link from before was <a href="/policies/pppindex.htm" target=_top>lin k here</a>, which of course removed all frames and loaded the single htm page in place of the frames. When you say parent.framenam e.location, I don't know what portion of that is referring to what part of my standard link.
Well, you could always have a regular link that goes to:
/policies/ppindex.htm target=frameNam e
...where "frameName" is the name of the frame you want loaded.
I have not worked with javascipt (enough) and I'm still pretty new to vb (newer to vb.net). I wouldn't know how to implement a script like that in any fashion.
Just one last comment: Every programmer runs into a situation in which he/she has "not worked with " some technology, language, or other, from time to time. The way you improve is to research the new thing when you run into it, rather than running away from it. Just a couple of weeks ago I had the task of adding water to a 3-D terrain mapping engine. I found the National Land Cover Data Set on the USGS web site, but that was only the beginning. The data was stored in GeoTiffs, which is a specialized form of Tiff file. To make it worse, it was stored in Albers Equal Araeqa Conical projection. Now, I knew nothing about parsing Tiff files, much less deriving Lat/Long information from a raster image with Albers Equal Area Conical projection. But I do now! ;-)
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer Neither a follower nor a lender be.
Thanks for the insight.
I think I'm still a few days off before I open a book or pdf doc on parsing Tiff files stored in Albers Equal Areqa Conical Projection. I tried to say that three, then just two times fast and I couldn't do it! :)
I'll keep working on a solution. Depending on what I finally implement, I'll let you know how it turned out. Should be amusing, and maybe informative, in any case! :)
Jim This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Maziar Aflatoun |
last post by:
Hi everyone,
I have the following shopping cart (basket view). However, Delete button in
my datagrid doesn't fire any events. Does anyone know why? (It's a user web
control)
<%@ Control Language="c#" AutoEventWireup="false"
Codebehind="ShoppingCart.ascx.cs" Inherits="TPShoppingCart.ShoppingCart1"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<asp:datagrid id="DGShoppingCart" AutoGenerateColumns="False" Width="650"
|
by: Chris Fink |
last post by:
Hello,
I have a datalist that contains an asp button. I have the need to pass a
value that is bound to my datalist along the button when the on_click event
is fired. My datalist creates a button for each row in my datasource, so
each button needs to pass a unique value. My questions are:
1. How do I pass the value with the button without making it visible on the
button or form.
2. Is there a way to grab this value in the button's...
|
by: giant food |
last post by:
Hi, I'm writing an asp app. I have a text box with a validator and a
submit button. Here is code from my .aspx file....
<asp:TextBox ID="txName" TextMode="SingleLine" Runat="server" />
<asp:RequiredFieldValidator ID="vName" Runat=server
ControlToValidate="txName" />
<asp:Button ID="btnSave" CssClass="button" Runat="server" />
|
by: Drebin |
last post by:
I am retrofitting a central login application and want to be able to read
the Request.ServerVariables so that when they have logged
on, I can send them back to wherever they were trying to go..
If you try to load a legacy ASP app, I do this:
If Len(SessionID) <> 40 Then
Response.Redirect "/WAS/Default.aspx?AppCode=2400"
End If
|
by: Roy |
last post by:
Ok, I feel silly asking this because it seems like such a simple thing
but I haven't been able to figure it out. Is it possible to create an
asp:button that functions just like an asp:linkbutton? What I'm trying
to do is when a user clicks a button (a pushbutton) it will open a new
page (not response.redirect but an entirely different browser window).
Seems simple, but the answer evades me. :(
| |
by: Lam |
last post by:
I want to dynamic generate a asp:button in C# class, not in the HTML code
so that it can call the methods in the c# class,
I try to use "Response.Write("<asp:button...>")
it didn't show the button
Can anyone help?
Thanks a lot
|
by: amit |
last post by:
I have a web service that returns a string when invoked by an onclick
event on a href.
I know need to bind this string to the commandArgument of an ASP:Button
so that when the button is pressed, I can use the returned argument in
the code behind page to process the appropriate method.
Any ideas how I can do this?
I have manage to return the string from the service and display it on
|
by: R.A.M. |
last post by:
Hi
I have very simple problem - I need to process asp:Button click at
server. I have written (my experience is little) in .aspx:
<asp:Button ID="GoTo" runat="server"
Text="Go To" OnClick="GoTo_Click" />
and in .aspx.cs I have written:
....
protected void Page_Load(object sender, EventArgs e)
|
by: R.A.M. |
last post by:
Hello,
I have very simple problem which I present here second time, because I
haven't got a solution.
I need to process asp:Button click at server. I have written (my
experience is little) in .aspx:
<asp:Button ID="GoTo" runat="server"
Text="Go To" OnClick="GoTo_Click" />
and in .aspx.cs I have written with Visual Studio:
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |