Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Frames without frames

Frames without frames

Frames without frames

I want to write an app with a treeview on the left and the corresponding page on the right. Perfect frame scenario. Can I replicate this in asp.net where when i click on the left tree, the right "frame" updates with the content of a page ?

RE: Frames without frames

Instead of a frame on the right to show your content, use a div. Then use javascript(I suggest using the JQuery library) to set the content of the div then a node is clicked in the treeview

RE: Frames without frames

That is easy to do yes but thameans I lose the code behind and all other code for the page. Or can I set the code behind within the div. (I don't think so)

RE: Frames without frames

Not sure what you are asking.
When you click on a treeview node, you can make an AJAX call using JQuery (this will call server code) then get your response and update the div.

RE: Frames without frames

Ok a better view of I want to do:

Lets say I develop pages to maintain stuff with each their own code behind for example EditEmployess.aspx, AddEmployees.aspx, etc... All these pages of course have no menus or anything, just the Data showing and edit controls.

Then My Default.aspx presents the left and right frames. In the left I have the tree and on the right I show the corresponding aspx page as requested on the tree.

Hope this is clearer

RE: Frames without frames

The way ASP.NET code behind works is not possible by just loading the HTML (View part) via Ajax.
I'm no ASP.NET expert, but I think the involvement of Ajax and ASP.NET is more complex for that very reason.

Code behind is a bad thing from a certain perspective. That's a more general observation, as that also is true for WPF or any other technology binding view and viewmodel or controller.
Browsers still support frames/iframes and though it may have a smell and is a nogog from some peoples persepcitves, it's a workable solution in regard of ASP.NET pages the way you do them.

There are specific extensions for ASP.NET in conjunction with Ajax, therefore: http://www.asp.net/ajax or http://www.telerik.com/campaigns/aspnet-ajax/free-...

You know the Microsoft motto, don't you? Always making a simple entry point, for the price of making things much more complicated when you want to do non basic stuff, like - for example - printing from a lightswitch application (RIP).

Bye, Olaf.

RE: Frames without frames

There technically is no need for the code-behind in this scenerio other than maybe binding the treeview control. AJAX and HTML/CSS is all you need from what I can determine from your needs. If I am missing something let me know. We can figure something out

RE: Frames without frames

I understand it that way: The navigational treeview is introduced to ASP.NET pages previously each having their own code behind. That's making it the problem, if moving them to a DIV only.

Bye, Olaf.

RE: Frames without frames

Thank you both for your inputs, it seems ,like I originally taught, that it is not possible outside of normal asp.net coding. I will use an HTML frame for now and see in the future if it is possible to recode that starting page. The only solution I came up with is to do all the coding in the starting page and trying to redirect the code behind to that page but it is so outside of the normal way for ASP.NET developers that it would quickly become a nightmare.

RE: Frames without frames

The treeview is an ASP.NET control but does not affect in any way what I am saying. An onclick just needs to be put on each node that calls javascipt. There is no problem, and the page would only have one code-behind file, no matter how many nodes in the tree.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close