frames in asp.net
-
i want my web page to appear like this:a list of references in left side,and when each reference is clicked the corresponding web page to be loaded on the right side(n user should still be able to see the reference menu)..I found out that there is something called frames in html.but it is giving the error as 'frameset' is not supported. <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Leave_procedure</title> </head> <frameset cols="150,*"> <frame src="default.aspx" name="menu" > <frame src="registration.aspx" name="main" ></frameset> </html> Above is my .aspx page.n is there any alternative to attain my objective???bcoz i found somebody quoting in a site that frames are the product of dark ages:confused::confused::confused:
-
i want my web page to appear like this:a list of references in left side,and when each reference is clicked the corresponding web page to be loaded on the right side(n user should still be able to see the reference menu)..I found out that there is something called frames in html.but it is giving the error as 'frameset' is not supported. <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Leave_procedure</title> </head> <frameset cols="150,*"> <frame src="default.aspx" name="menu" > <frame src="registration.aspx" name="main" ></frameset> </html> Above is my .aspx page.n is there any alternative to attain my objective???bcoz i found somebody quoting in a site that frames are the product of dark ages:confused::confused::confused:
myinstincts wrote:
bcoz i found somebody quoting in a site that frames are the product of dark ages
Well, that is true. They are other n number of problems while implementing the frames such as propogation of events. In your case, you can make of use of div/table to do this.
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
i want my web page to appear like this:a list of references in left side,and when each reference is clicked the corresponding web page to be loaded on the right side(n user should still be able to see the reference menu)..I found out that there is something called frames in html.but it is giving the error as 'frameset' is not supported. <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Leave_procedure</title> </head> <frameset cols="150,*"> <frame src="default.aspx" name="menu" > <frame src="registration.aspx" name="main" ></frameset> </html> Above is my .aspx page.n is there any alternative to attain my objective???bcoz i found somebody quoting in a site that frames are the product of dark ages:confused::confused::confused:
Yes you are right.. We dont use Framesets now... Reason : 1. It is very hard to handle Javascript Events when there is more than one frame in the document. We have to reference controls from other pages only using
window.parent
. For example : If you just willing to change the text of a control with some operation of another frame, you need to hook the textbox object in Window.parent object and then get its reference. So we are unnecessarily creating complexity :^). 2. In Asp.NET we rely with Server side events most of the time. In case of Frames, 2 or more document is created, so if you postback a page, u cant reference the other pages. So we need to forcefully postback other forms to get reference in the server. Also forcing postback of 2 pages simultaneously will create two requests to the server. So you need create custom form element to ensure everything goes in a single postback, which means more complexity :(( . 3. Frames looks very odd and unprofessional to me. X| Err.. Although, That might be only my problem... So I would recommend to make layout using Table.<table style="width:100%;border:0px">
<tr>
<td style="width=30%">
//Page in the right side.
</td>
<td>
//Page in the left side.
<td>
</tr>
</table>You can create the same page layout easily using table. If you are worried about the splitter control.. you can find a lots of them easily by searching in google. Or you can also create one yourself. So personally I suggest you to avoid Framesets totally.:cool:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.