Are Frame pages really taboo in ASP.NET?

  • Thread starter Thread starter moondaddy
  • Start date Start date
M

moondaddy

Are frame pages really taboo in asp.net and if so, why and what's the down
side of using them? I'm trying to use user controls instead, but it seems
that a lot of things were a lot easier with frames and the user experience
was better. Some one please enlighten me.
 
It's common to find people avoiding frames because they do not understand it
completely. Education is the key to using frames correctly. Start with msdn,
you can find a lot there.
 
Hi moondaddy,


Thanks for posting in the community! My name is Steven, and I'll be
assisting you on this issue.
From your description, you need some suggestions on using frame pages in
ASP.NET web applicatoin. Also, you feel somewhat confused on why such frame
based page are not so popular in ASPL.NET web application and is there any
disadvantages using it, yes?
If there is anything I misunderstood, please feel free to let me know.

As for this question, I first should confirm that there doesn't exisit any
disadvantages of using frame pages in ASP.NET web application. We can use
frame/frameset based web pages in ASP.NET web application as well as other
web projects. Also, we can use normal html pages as well as aspx web pages
in a frameset. And as for the problems which occurs when using
frame/framesets in ASP.NET, I think that's probably because of the
complication of using frame based pages, not only in ASP.NET web pages.
Since the diferent web pages within the frames in the same frameset are
acutally sparately from each other, we need some skills when implement the
communication between these pages. That'll sometimes cause the
difficulties. Also, when we mixed the html with the dynamical server page
techs such as ASP.NET, the complication will even increase than the common
html page. But that won't cause any other taboo for the frame pages in
the asp.net web application. Do you think so?
In addition, I've searched some tech reference on the "frame/frameset" in
web pages(not particularly for asp.net). I believe they'll be helpful to
you.

#Introduction to Framesets
http://msdn.microsoft.com/library/en-us/vsintro7/html/vxoriIntroductionToFra
mesets.asp?frame=true

#Create a Frameset
http://msdn.microsoft.com/library/en-us/htmlhelp/html/vsconOverfr.asp?frame=
true

Please check out the above items. If you have any further questions, please
feel free to let me know.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Hi moondaddy,


Have you had a chance to check out my suggestions or have you got any new
ideas on the frames based web page designing?
If you need any further assistance, please feel free to post here.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Thanks for the reply Steven. Since it took a while to get feedback from
various sources about frames I went ahead with a frameless solution for this
particular case. However, I have searched far and wide on how to make
"ONLY" the user control do a postback while leaving the rest of the parent
page as-is with out doing a postback and none of the replies told my how to
do that but rather told me how to make it appear as such. I think frames do
have some positive benefit so I will attempt a second version of this page
soon and convert it to a frame page. At that time I can give you more
feedback. I will say this however which it would be great if you could pass
it along to the higher-ups: It seems as though MS is steering away from
frames as I don't see any documentation or examples combining frames and
aspx pages. But if there's a way to deliver a good solution using frames
and aspx pages, it would be great to see MS provide some documented examples
using the proper techniques. OR, if there's a better way to using user
controls to emulate frames including having a page scroll in a user control
which makes it appear to be in a frame or an iframe so that the rest of the
page doesn't scroll (and to send less bytes across the wire when updating a
use control), then show some specific examples of that. I see lots of
people in the user groups trying to do this with lots of trouble so it would
be worth while to provide such documentation.

Thanks again for all of your help!!!
 
Hi moondaddy,


Thanks for your followup. As for the frame based pages, I don't think MS is
steering away from it. The reason why frame based page can't be replaced by
a function or mechanism of the ASP.NET UserControl is the difference
between frame based pages and normal web pages(not specially ASP.NET
pages). Because such a frame or iframe element is actually a single page
which is separate from its container page. However, the UserControl in a
ASP.NET page is like an element in the page, it's not a separate page. So
it is certainly that the UserControl can't replace the Frame's
functionality. That's also why when post back a UserControl, the container
can't prevent from being post back too. In fact, the UserControl is
designed to help the developer to easily reuse some codes and page layout
rather than provide the frame's functionality. How do you think of this?

Any way, since you'd like to try implement your program in a new frame
based version. If you encounter any problems on it, please feel free to
post here. I'll be willing to assist you.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Hi moondaddy,


As for the problems that few document with frame based page programming in
MSDN, I think you may submit the suggestion or also any other good
suggestions on the following site:
#Product FeedBack
http://register.microsoft.com/mswish/suggestion.asp.

Also, I have already submitted your request for more frames related
documentation on it. Please feel free to post your requests and suggestions
there.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Steven, In a post related to this thread or a related thread (which I can no
longer find online) you gave me a good code example which demonstrated how
to call a JavaScript in Frame B from Frame A, pass a parameter into a hidden
element in Frame B and then call the click event of a server control button
which forced a postback in Frame B. Additionally, Frame B contained a web
user control. That worked, but isn't the following line of code which could
be called from any frame and any control be a much simpler way to do it?

parent.Body.frameElement.src="Body/Products.aspx?MenuID=333";

Are there any drawbacks to doing it this way?

Thanks for all of your ongoing help!
 
Hi Moondaddy,


Thanks for your followup. Yes, you're right, we can use the below code to
refer a brother frame and do operations on it:
window.parent.framename.{operationname}

But one thing important is that the frames need to be at the same
hierarchy, in other word, they are in the same parent frameset page. For
example:

<frameset cols="*,*">
<frame name="left" src="left.aspx">
<frame name="right" src="right.aspx">
<noframes>


Then, left.aspx can refer page right.aspx also the contrary. If you feel
anything unclear or have any further questions, please feel free to post.
I'll be willing to assit you.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top