Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter Grillo Frederiksen 34 posts 67 karma points
    Jan 11, 2012 @ 19:39
    Peter Grillo Frederiksen
    0

    .Net usercontrol - get all datatypes

    Hey all.

    I'm creating a usercontrol in asp.net (I'm not using xslt, as i also need member info)

    I've created af custom datatype (id = 1886), with item 1, 2, 3 and 4. I need to sort members according to which datatype the members belong.

    So in my asp.net usercontrol, I need something like this:

    Node node = new Node(1886);
    
        foreach (Node childNode in node.Children) {
            foreach (Member m in Member.GetAll where prmPos = childnode.id) {
                // all info on members
            }
        }

    I hope you get the drift ;)
    Can someone tell me, why when i write:

    Node node = new Node(1886);

    foreach (Node childNode in node.Children) { Response.Write(childeNode.ID); }

    I get zero result?
    Is there anyway to write this in XSLT, if asp.net is to stupid to use?

    Cheers
    Peter

  • jigar 170 posts 233 karma points
    Jan 11, 2012 @ 19:49
    jigar
    0

    Hi Peter,

    Can you please explain the relation of members with nodes. I mean the business logic part.

    This may help us to understand better.

    Thanks,

    Jigar

  • Peter Grillo Frederiksen 34 posts 67 karma points
    Jan 11, 2012 @ 19:59
    Peter Grillo Frederiksen
    0

    Hey jigar,

    I'm not quite sure I understand your question, so maybe I now explain something totally different then what you asked for - so sorry in advance ;)
    Here goes:

    I have a list of members, which I need to list into categories. They are all part of the same MemberGroup, which can't be changed. So I added a custom datatype, to sort the members in categories this way.
    So I need the usercontrol to make a "foreach" for all the categories in the custom datatype. Thereafter I need to list all the members, which are part of that category.

    Something like this:

    Category1
     - member a
     - member b

    Category2
    - member c
    - member f

    Category3
    - member d
    - member e

    Does this answer your question or??
    Cheers 

  • Peter Grillo Frederiksen 34 posts 67 karma points
    Jan 13, 2012 @ 16:15
    Peter Grillo Frederiksen
    0

    Hey all,

    Let me try again, maybe I'm not saying it right ;)

    I need something like this:

     

    Node node =newNode(1886);

            foreach("item in datatype with id '1886'"){
                    Response.Write(item.id);
    foreach (member where x=item.id) {
    Response.Write(member information etc.)
    }

    Does it make sense?
    Cheers,

    Peter 

     

Please Sign in or register to post replies

Write your reply to:

Draft