Here is a sample of the .net code (that creates xml code) that I need to create (an IE Web Control):
<iewc:TreeView id......>
<iewc:TreeNode Text="xxx" expand="true">
<iewc:TreeNode Text="aaa"></iewc:TreeNode>
</iewc:TreeNode>
<iewc:TreeView>
This code gets served by the...
Again, the issue is that the treenode XML is served BEFORE the code behind - so trying to build the xml in the code behind does not work as the aspx page is served without the xml being built yet... make sense?
Not trying to make trouble... if seeing the code would help - I'd be glad to provide...
The problem with that is that the code that is being produced is xml for a tree node and it seems to fire that code before the code behind so it will not work if it created in the code behind....
I ahve the follwoing code in a control:
<%@Import namespace="System.Data"%>
<%@Import namespace="System.Data.SqlClient"%>
<script language="C#" runat="server">
DataSet nodeDS = new DataSet();
dataSet GetNodes() {
SqlDataAdapter nodeAptr = new Sql........
nodeAptr.Fill(nodeDS, "nodes")...
I need to make some xml that will make a tree node out of 1 (if possible) result set... How would you suggest I do this... I want to make 1 query and then loop through it to produce something like:
parent 1
--- child 1a
--- child 1b
--- child 1c
parent 2
--- child 2a
---...
No, I do not have anything done yet - I am just trying to figure out how much of this SQL should handle and how much .net should handle... Ideally, I'd like to accomplish it all in SQl and just loop through the results, but I am not sure if that is even possible....
I need a query to produce a tree node - something like:
parent 1
--- child 1a
--- child 1b
--- child 1c
parent 2
--- child 2a
--- child/parent 2b
--- child 2b1
--- child 2b2
all of these are in the same table that looks something like:
id parentID hasChild...
I need to do a between query on a varchar field that looks like, for example, 12 DEC 2007
so something like ...where field1 between '12 DEC 2007' and '12 JAN 2008'
is there a way to do this?
I see the calendar control comes with the buttons to change the moths... is there a way to add buttons to change the year? so with one click I can go from mar 2007 to mar 2006?
I'm sure it is an issue with the data... it's weird - this:
And B.ID in (select max(ID) from @ab group by ParentID)
gives me the majority of the results I should have, and:
And B.ID in (select max(ID) from @ab group by ID)
seems to give me the ones the first on is missing....
ok - if I add a distinct to the original select...
Select distinct A.Name + isnull('/' + B.Name, '') As OutputColumn
From (
select * from @ab
where parentID = 0
) A
Left Join
(
select y.* from @ab y
inner join @c z
on y.ID = z.id
)B
On A.Id =...
ok - Table a/b looks like:
id name parentid
1 aaa 0
2 bbb 0
3 ccc 0
4 ZZZ 1
5 YYY 1
6 XXX 3
Table c looks like
id tableabid
1 3
2 3
3 5
4 5
5 2
so I would want the following...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.