473,385 Members | 1,593 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Not sure how to entitle this?

I have a site where most of the time users never leave the default page.
Using an iframe, most pages are loaded into the iframe when users click
buttons via codebehind code.

After optimizing the site (unless I set the robot.txt to indicate
otherwise), the search engines are going to create links directly to these
'child' pages and when users click those links they're going to load pages
that don't have any navigation to the site itself.

Is there a way to put code in the page_load event that will check to see if
the page is being presented within an iframe, and if not, redirect the page
to the default page?

I hope this question is clear.

Thanks,

Ross
Aug 15 '07 #1
2 1108
in client script you can check if the page is the parent and if not,
redirect to default and pass a parameter specifying the iframe src.

-- bruce (sqlwork.com)
Ross Culver wrote:
I have a site where most of the time users never leave the default page.
Using an iframe, most pages are loaded into the iframe when users click
buttons via codebehind code.

After optimizing the site (unless I set the robot.txt to indicate
otherwise), the search engines are going to create links directly to these
'child' pages and when users click those links they're going to load pages
that don't have any navigation to the site itself.

Is there a way to put code in the page_load event that will check to see if
the page is being presented within an iframe, and if not, redirect the page
to the default page?

I hope this question is clear.

Thanks,

Ross

Aug 15 '07 #2
Sweet! Thanks, Bruce.
"bruce barker" <no****@nospam.comwrote in message
news:%2***************@TK2MSFTNGP06.phx.gbl...
in client script you can check if the page is the parent and if not,
redirect to default and pass a parameter specifying the iframe src.

-- bruce (sqlwork.com)
Ross Culver wrote:
>I have a site where most of the time users never leave the default page.
Using an iframe, most pages are loaded into the iframe when users click
buttons via codebehind code.

After optimizing the site (unless I set the robot.txt to indicate
otherwise), the search engines are going to create links directly to
these 'child' pages and when users click those links they're going to
load pages that don't have any navigation to the site itself.

Is there a way to put code in the page_load event that will check to see
if the page is being presented within an iframe, and if not, redirect the
page to the default page?

I hope this question is clear.

Thanks,

Ross

Aug 15 '07 #3

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

Similar topics

4
by: Oliver Spiesshofer | last post by:
Hi, I want to make a standard-function that handles "Are you sure"-type questions. In my idea it should look something like this: <code> Function deleteitem($item) {
1
by: BKM | last post by:
I've been using the following 2 ways to make sure my WebBrowser is finished loading a page before continuing with the next code. do:doevents:loop while WebBrowser.Busy do:doevents:loop until...
7
by: simondex | last post by:
Hi, Everyone! How could I make sure that nine values (from 0 to N) are all different without writing too many loops? I am not afraid of statistical parameters (e.g. coefficient of variation,...
3
by: ColinWard | last post by:
Hi again. I am trying to figure out how to make sure that a value has been selected from a combobox on a form. I have tried using isnull(comboboxname.text) and isempty(comboboxname.text)and...
37
by: yogpjosh | last post by:
Hello All, I was asked a question in an interview.. Its related to dynamically allocated and deallocated memory. eg. //start char * p = new char; ...
4
by: Laphan | last post by:
Hi The god that is Martin Honnen gave me a great tip to DOM/JS some HTML data into an iframe, but I need to make sure that the iframe is ready to take it before I paste it in. At the moment,...
11
by: Hari Sekhon | last post by:
I have written a script and I would like to ensure that the script is never run more than once at any given time. What is the best way of testing and exiting if there is another version of this...
11
by: PokerMan | last post by:
Hi I have a situation where a method is fired from receiving a message from my server. On receiving this message it triggers a visual animation. So what happens when the server sends say 3...
3
by: sheldonlg | last post by:
I have a page that has three submit buttons. Depending upon which one was clicked, I process it differently on the server in php. One of those buttons is a delete action so I would like to add an...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.