Hi,
I am starting a new project to build a software product using APS.NET 2.0.
In past I have used "frameset" and "frame" to build pages. My current
requirements I have coded using frameset and frame like code below.
My question is, because this is a new development is it good to use frameset
and frame or I can use some thing better. I am looking for expert suggestions
on my code below is this a good way to move or I should not use frames.
As you know I am not an ASP.NET expert I am just looking for correct
direction on new ASP.NET development not details.
Thanks a lot,
Ashok
Code
---------
***********
default.htm
***********
<html>
<head>
<script type="text/javascript">
var columntype=""
var defaultsetting=""
var currset3=""
var currset4=""
function getCurrentSetting()
{
if (document.body)
return (document.body.cols) ? document.body.cols :
document.body.rows
}
function setframevalue(coltype, settingvalue)
{
if (coltype=="rows")
document.body.rows=settingvalue
else if (coltype=="cols")
document.body.cols=settingvalue
}
function resizeFrame(contractsetting)
{
if (getCurrentSetting() != defaultsetting)
setframevalue(columntype, defaultsetting)
else
setframevalue(columntype, contractsetting)
}
function init()
{
if (!document.all && !document.getElementById)
return
if (document.body!=null)
{
columntype=(document.body.cols)? "cols" : "rows"
defaultsetting=(document.body.cols)? document.body.cols :
document.body.rows
}
else
setTimeout("init()",100)
}
setTimeout("init()",100)
</script>
</head>
<frameset cols="20%,80%">
<frame src="C:\Temp\tree.htm" scrolling="auto" frameborder="0">
<frame src="C:\Temp\main.htm" scrolling="auto" frameborder="0">
</frameset>
</html>
*********
tree.htm
*********
<html>
<body>
<TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%">
<tr>
<td>
<a href="javascript:parent.resizeFrame('25,*')">+</a>
</td>
</tr>
</TABLE>
</body>
</html>
*********
main.htm
*********
<html>
<head>
<script type="text/javascript">
var columntype=""
var defaultsetting=""
var currset3=""
var currset4=""
function getCurrentSetting()
{
if (document.body)
return (document.body.cols) ? document.body.cols :
document.body.rows
}
function setframevalue(coltype, settingvalue)
{
if (coltype=="rows")
document.body.rows=settingvalue
else if (coltype=="cols")
document.body.cols=settingvalue
}
function resizeFrame(contractsetting)
{
if (getCurrentSetting() != defaultsetting)
setframevalue(columntype, defaultsetting)
else
setframevalue(columntype, contractsetting)
}
function resizeFrame1(contractsetting)
{
if (currset3 == '')
{
currset3=getCurrentSetting()
setframevalue(columntype, contractsetting)
}
else
{
setframevalue(columntype, currset3)
currset3=""
}
}
function resizeFrame2(contractsetting)
{
if (currset4 == '')
{
currset4=getCurrentSetting()
setframevalue(columntype, contractsetting)
}
else
{
setframevalue(columntype, currset4)
currset4=""
}
}
function init()
{
if (!document.all && !document.getElementById)
return
if (document.body!=null)
{
columntype=(document.body.cols)? "cols" : "rows"
defaultsetting=(document.body.cols)? document.body.cols :
document.body.rows
}
else
setTimeout("init()",100)
}
setTimeout("init()",100)
</script>
</head>
<frameset rows="50%,40%,5%,5%">
<frame src="C:\Temp\page1.htm" scrolling="auto" frameborder="0">
<frame src="C:\Temp\page2.htm" scrolling="auto" frameborder="0">
<frame src="C:\Temp\page3.htm" scrolling="auto" frameborder="0">
<frame src="C:\Temp\page4.htm" scrolling="auto" frameborder="0">
</frameset>
</html>
**********
page1.htm
**********
<html>
<body>
<TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%">
<tr>
<td>
<a href="javascript:parent.resizeFrame('44,*,44,44')" >Page 1</a>
</td>
</tr>
</TABLE>
</body>
</html>
**********
page2.htm
**********
<html>
<body>
<TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%">
<tr>
<td>
<a href="javascript:parent.resizeFrame('44,*,44,44')" >Page 2</a>
</td>
</tr>
</TABLE>
</body>
</html>
**********
page3.htm
**********
<html>
<body>
<TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%">
<tr>
<td>
<a href="javascript:parent.resizeFrame1('44,44,*,44') ">Page 3</a>
</td>
</tr>
</TABLE>
</body>
</html>
***********
page4.htm
***********
<html>
<body>
<TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%">
<tr>
<td>
<a href="javascript:parent.resizeFrame2('44,44,44,*') ">Page 4</a>
</td>
</tr>
</TABLE>
</body>
</html> 6 1628
You could use Masterpages. Give them a readup. All the functionality I
can think of is availible via these.
Thanks
Greg
> My question is, because this is a new development is it good to use frameset and frame or I can use some thing better.
Frames are rarely a good idea.
To better answer your question, we need to know WHY you chose to use Frames
in the first place.
If you were using it to organize your page layout, odds are that you'd be
better off using CSS.
If you were using it to maintain common components, odds are that you'd be
better off using webControls.
-Darrel
Thank you Darrel. To give you more details, my front end may look like msdn
site not same just to give you some idea... on left frame tree control on
right side 4 frames which can be collapse and expand. On first frame I have
controls like list box and buttons, second frame has also same controls but
list box will populate base on selection on first frame, third frame will
have all dynamic controls (list, text, dropdown,cal.) generation. and forth
frame I am planning to put Grid View which I use now OWC (PivotTable)
control. When button clicked on first frame (Run Query) I want to read data
from all the frames build Query Request (may be xml) get the data from
database and show data on forth frame's Grid View.
Frames works fine now because when user selects any thing on first frame my
whole page doesn't do post back (for users they don't like flicker on page).
Even there are lots of Java scripts but some how it's easy now working with
different frames.
There are also lot of data stored in session as you see in the third frame I
have dynamic controls and data all saved in session.
Tree control on left should also expand and collapse to left.
User wants frames to collapse because once they run the query they want full
page to see data (Grid View) on forth frame. Hope you got the idea.
I need help to get correct direction what I should use because I am starting
again in .net 2.0 and want to use if there are any better framework for my
development.
Thanks a lot - Ashok
"darrel" wrote: My question is, because this is a new development is it good to use frameset and frame or I can use some thing better.
Frames are rarely a good idea.
To better answer your question, we need to know WHY you chose to use Frames in the first place.
If you were using it to organize your page layout, odds are that you'd be better off using CSS.
If you were using it to maintain common components, odds are that you'd be better off using webControls.
-Darrel
> Frames works fine now because when user selects any thing on first frame my whole page doesn't do post back (for users they don't like flicker on page).
I wouldn't use frames to just get rid of the 'flicker'. Loading pages on the
internet is how the web pretty much works. People are used to it. It's not a
'bug' to fix.
So, instead of frames, I'd use web controls. One for your menu, a handful
for your content, etc.
Even there are lots of Java scripts but some how it's easy now working with different frames.
Getting Javascript to behave across frames is a chore. Another reason to
drop the frames.
There are also lot of data stored in session as you see in the third frame I have dynamic controls and data all saved in session.
This might be a reason to use frames. You might also be able to use
viewstates instead, though.
User wants frames to collapse because once they run the query they want full page to see data (Grid View) on forth frame. Hope you got the idea. I need help to get correct direction what I should use because I am starting again in .net 2.0 and want to use if there are any better framework for my development.
If you are ambitious, check out using usercontrols for your compoents, and
CSS + AJAX for your interface. AJAX will give you the layout control you are
looking and allow you to not have to do full page reloads without having to
deal with frames.
-Darrel
You should use master pages, they give the same functionality for
reusability of markup etc but avoid the frames which are increasingly
considered outdated and a bad idea. Frames arent supported on all platforms
like mobiles and pda's whereas master pages produce normal markup so could
be view on those platforms.
HTH
Ciaran
"Ashok" <As***@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.com... Hi,
I am starting a new project to build a software product using APS.NET 2.0. In past I have used "frameset" and "frame" to build pages. My current requirements I have coded using frameset and frame like code below. My question is, because this is a new development is it good to use frameset and frame or I can use some thing better. I am looking for expert suggestions on my code below is this a good way to move or I should not use frames.
As you know I am not an ASP.NET expert I am just looking for correct direction on new ASP.NET development not details.
Thanks a lot, Ashok
Code --------- *********** default.htm ***********
<html> <head> <script type="text/javascript">
var columntype="" var defaultsetting="" var currset3="" var currset4=""
function getCurrentSetting() { if (document.body) return (document.body.cols) ? document.body.cols : document.body.rows }
function setframevalue(coltype, settingvalue) { if (coltype=="rows") document.body.rows=settingvalue else if (coltype=="cols") document.body.cols=settingvalue }
function resizeFrame(contractsetting) { if (getCurrentSetting() != defaultsetting) setframevalue(columntype, defaultsetting) else setframevalue(columntype, contractsetting) }
function init() { if (!document.all && !document.getElementById) return if (document.body!=null) { columntype=(document.body.cols)? "cols" : "rows" defaultsetting=(document.body.cols)? document.body.cols : document.body.rows } else setTimeout("init()",100) }
setTimeout("init()",100)
</script>
</head> <frameset cols="20%,80%"> <frame src="C:\Temp\tree.htm" scrolling="auto" frameborder="0"> <frame src="C:\Temp\main.htm" scrolling="auto" frameborder="0"> </frameset> </html>
********* tree.htm ********* <html> <body> <TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%"> <tr> <td> <a href="javascript:parent.resizeFrame('25,*')">+</a> </td> </tr> </TABLE> </body> </html>
********* main.htm ********* <html> <head> <script type="text/javascript">
var columntype="" var defaultsetting="" var currset3="" var currset4=""
function getCurrentSetting() { if (document.body) return (document.body.cols) ? document.body.cols : document.body.rows }
function setframevalue(coltype, settingvalue) { if (coltype=="rows") document.body.rows=settingvalue else if (coltype=="cols") document.body.cols=settingvalue }
function resizeFrame(contractsetting) { if (getCurrentSetting() != defaultsetting) setframevalue(columntype, defaultsetting) else setframevalue(columntype, contractsetting) }
function resizeFrame1(contractsetting) { if (currset3 == '') { currset3=getCurrentSetting() setframevalue(columntype, contractsetting)
} else { setframevalue(columntype, currset3) currset3="" } }
function resizeFrame2(contractsetting) { if (currset4 == '') { currset4=getCurrentSetting() setframevalue(columntype, contractsetting)
} else { setframevalue(columntype, currset4) currset4="" } }
function init() { if (!document.all && !document.getElementById) return if (document.body!=null) { columntype=(document.body.cols)? "cols" : "rows" defaultsetting=(document.body.cols)? document.body.cols : document.body.rows } else setTimeout("init()",100) }
setTimeout("init()",100)
</script>
</head> <frameset rows="50%,40%,5%,5%"> <frame src="C:\Temp\page1.htm" scrolling="auto" frameborder="0"> <frame src="C:\Temp\page2.htm" scrolling="auto" frameborder="0"> <frame src="C:\Temp\page3.htm" scrolling="auto" frameborder="0"> <frame src="C:\Temp\page4.htm" scrolling="auto" frameborder="0"> </frameset> </html>
********** page1.htm ********** <html> <body> <TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%"> <tr> <td> <a href="javascript:parent.resizeFrame('44,*,44,44')" >Page 1</a> </td> </tr> </TABLE> </body> </html>
********** page2.htm ********** <html> <body> <TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%"> <tr> <td> <a href="javascript:parent.resizeFrame('44,*,44,44')" >Page 2</a> </td> </tr> </TABLE> </body> </html>
********** page3.htm ********** <html> <body> <TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%"> <tr> <td> <a href="javascript:parent.resizeFrame1('44,44,*,44') ">Page 3</a> </td> </tr> </TABLE> </body> </html>
*********** page4.htm *********** <html> <body> <TABLE style="border-collapse: collapse; border: solid;" WIDTH="100%"> <tr> <td> <a href="javascript:parent.resizeFrame2('44,44,44,*') ">Page 4</a> </td> </tr> </TABLE> </body> </html>
Hi,
Ciaran wrote: You should use master pages, they give the same functionality for reusability of markup etc but avoid the frames which are increasingly considered outdated and a bad idea. Frames arent supported on all platforms like mobiles and pda's whereas master pages produce normal markup so could be view on those platforms.
HTH
Ciaran
While I generally agree that frames should rather be avoided, it is
incorrect that PDAs are unable to handle them. Popular PalmOS browsers
like Blazer, AvantGo or Xiino all have their own way to deal with
frames. Blazer displays all the frames on the same page (same effect
than if you were using Masterpages), Xiino has a frame navigation button
which allows you to switch between frames.
Having frames on a page doesn't mean that your page won't be useful on
mobile devices anymore.
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Niels Berkers |
last post by:
Hi,
i'd like to host my web pages using multiparts to reduce the number of
hits on the server.
i know this isn't a real PHP subject, but i'll try it anyway.
i've been searching the web for...
|
by: Beth Ann |
last post by:
Larry--I've got an Access 97 question only a 97 guru could answer. How do I
use the F1 key to start Help?
|
by: Cal Lidderdale |
last post by:
My input line is i1,i2,i3,i4,i5,i6,i7,i8^,...i596,597, ...
14101,14102...NL/CR
very long line of data - I only want the first 8 items and
the delimiter between 8 & 9 is a carrot "^".
The line...
|
by: Kalafiorczyk |
last post by:
Good day ladies and gentlemen!
I have a short proggie:
-----------------------------------------------------------------------
#using <mscorlib.dll>
using namespace...
|
by: News |
last post by:
Hello, I have to build a program with the future in mind and I need a bit
of guidance from a guru or two. My program will start as a multi-user
Windows Application built with VB.Net and using an...
|
by: Uwe C. Schroeder |
last post by:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Here's a question for the SQL guru's out there, which I've been trying to
solve for the last couple of hours. There's got to be a solution to...
|
by: ExecMan |
last post by:
Hi All,
I'm sure all the guru's know this one, but I cannot find it. I just
installed Luinx. I configured Apache and got everything up and
running.
When I do my PHP test, it asks me to...
|
by: Singulus |
last post by:
Hello all,
I've searched for similar threads, I've found some bit of useful info
here and there, but nevertheless I want to post my questions...So, how
can I (we, in fact the forum can benefit...
|
by: Bob |
last post by:
Hello,
I was hoping someone could help me with what I think should be a
relatively easy code question, but I can't seem to find what I'm looking
for.
I put together a screen shot of what I'm...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
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,...
| |