yaniv Posted June 18, 2004 Posted June 18, 2004 i use two frames to keep my right menu. when the user click "home page" in that menu the page redirect to the home page. all my menus using response.redirect and not "a href". the problem is that only the right menu move to the home page (only one frame). how can i cancell the frames and move the entire page to the new location? Quote
Moderators Robby Posted June 18, 2004 Moderators Posted June 18, 2004 You would an easier time not using frames and using user controls for the menus or even templating for the entire app. Quote Visit...Bassic Software
Arch4ngel Posted June 18, 2004 Posted June 18, 2004 I agree with Robby. Frames sux up to a point. They have their use but not anymore in menu/content navigation. Rather use tables to make a template (like Robby said). Once this is done... Everything will be so simple. By the way... The last time I saw a Professional Web site using frames was... in 1998 ? 1997 maybe ? Don't remember one today that use frames. Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
yaniv Posted June 18, 2004 Author Posted June 18, 2004 why i use frames i use frame because i want to use a tree view controler. this control in loading during run time (thousads of nodes) from the sql server. since that i have reload the tree every time the user clicking the three and thourth lavel of the tree, and the problem is the reloading of the entire page (two usercontrols, and every thing) is looking ugly in every click. do you know another solution for that? Quote
Arch4ngel Posted June 18, 2004 Posted June 18, 2004 Does your nodes move often or are they rather static ? Does your cache is activated ? Why hell do you need a thousand nodes in a menu ( what are you doing !? ) ? Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
yaniv Posted June 18, 2004 Author Posted June 18, 2004 the database, after we will finish, will be static (more or less). i don't know to use cashe... what we do is to collect articles (mainly answers to youth questions) from five large sites. All sites have Q&A parts, which, we fill, Recursing over and over. We tried some methods in making the search more easy for the youth, and find the treeview. So, we have dozens of volunteers that moving all over the sites and collect the pages make them into hierarchical order and keyword them. It's going to take some time, and till then the database is going to change daily. :) Quote
yaniv Posted June 18, 2004 Author Posted June 18, 2004 just thought to include the sub i use to load the treeview, in case you"l have a better way: Private Sub loadtreeview(ByVal e As Telerik.WebControls.RadTreeNodeEventArgs) Dim DS As New DataSet() Dim cmd As New SqlCommand() Dim i As Int32 Dim odataadapter As New SqlDataAdapter() If e.NodeClicked.Value = 1 Then e.NodeClicked.Expand() End If If e.NodeClicked.Value = 2 Then cmd = New SqlCommand() If oConnection.State = ConnectionState.Closed Then oConnection.Open() cmd.Connection = oConnection cmd.CommandText = "SELECT * from tbl_subcutegory WHERE cutegory ='" & e.NodeClicked.Text.ToString & "'" odataadapter = New SqlDataAdapter(cmd) odataadapter.Fill(DS) oConnection.Close() If DS.Tables(0).Rows.Count > 0 Then e.NodeClicked.Nodes.Clear() For i = 0 To DS.Tables(0).Rows.Count - 1 Dim childNode As RadTreeNode = CreateNode(textreplace(Trim(DS.Tables(0).Rows(i).Item("subcutegory"))), False) childNode.Value = 3 e.NodeClicked.AddNode(childNode) Next i e.NodeClicked.Expand() End If End If If e.NodeClicked.Value = 3 Then cmd = New SqlCommand() If oConnection.State = ConnectionState.Closed Then oConnection.Open() cmd.Connection = oConnection cmd.CommandText = "SELECT * from tbl_subjects WHERE subcutegory ='" & e.NodeClicked.Text.ToString & "'" odataadapter = New SqlDataAdapter(cmd) odataadapter.Fill(DS) oConnection.Close() If DS.Tables(0).Rows.Count > 0 Then e.NodeClicked.Nodes.Clear() For i = 0 To DS.Tables(0).Rows.Count - 1 Dim childNode As RadTreeNode = CreateNode(textreplace(Trim(DS.Tables(0).Rows(i).Item("subject"))), False) childNode.Value = 4 childnode.href = "show.aspx?id=" & Trim(DS.Tables(0).Rows(i).Item("ID")) & "&word=" & Trim(DS.Tables(0).Rows(i).Item("subject")) childNode.Target = "show" e.NodeClicked.AddNode(childNode) Next i e.NodeClicked.Expand() End If End If End Sub Quote
Arch4ngel Posted June 18, 2004 Posted June 18, 2004 I thought of putting it inside Javascript... maybe I'm wrong but it's faster in javascript... however... my idea is bad because the JS file will be way too heavy for a common user. Yeah... maybe frames might be good in this case... but only if you ABSOLUTLY want to make it work in a treeview. I'm not fan of TreeView for this case... I would have break questions into category an make questions appear in a DataGrid depending of the category. Like this... "youth" will be able to search for questions inside category and you'll even be able to make it work with a search engine (that you should create) Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
Moderators Robby Posted June 21, 2004 Moderators Posted June 21, 2004 I have to say, a treeView is the exception to my rule of not using frames, sorry I can't help though. Quote Visit...Bassic Software
yaniv Posted June 21, 2004 Author Posted June 21, 2004 two ways to solve: out of frames in reponse.redirect: Response.Clear() Response.Write("<script language='javascript'>;window.top.location='" & path & " '; </script>") Response.End() a way to refresh only the part of page that have been changed, you put that line in the head of the page: <meta http-equiv="Page-Enter" content="revealTrans(Duration=0,Transition=5)"> both ways working great. no teacher like necessity. Quote
Arch4ngel Posted June 21, 2004 Posted June 21, 2004 Okay ... I must surrender... frames are compulsory... tssss I hate those exception case. Well... enough babling... let get a solution... yaniv... excellent ! I like your first answer... will work great ! However... I'm totally against the second... just imagine a little bit... 200 users... all refreshing almost at the same time... every 5 seconds (or any interval...) ... don't you think that the server will simply be overused ? The first answer solve the problem without buzzing the server. Quite a good work though Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.