Copied to clipboard

Flag this post as spam?

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


  • Max 144 posts 166 karma points
    May 16, 2011 @ 17:13
    Max
    0

    asp:dropwdownlist from xslt

    hi i need to put all datas into a asp:dropdownlist tag in xslt  i did it by putting

    xmlns:asp="remove" 

    and here is my code:

    <form name="myForm" action="" runat="server" method="post"> 
     
      <!--<asp:DropDownList ID="mylist" runat="server" OnChange="location='{umbraco.library:NiceUrl($currentPage/@id)}?DeptName='+document.myForm.mylist.options[document.myForm.mylist.selectedIndex].value" style="font-family:Arial;font-size:X-Small;">-->
      <asp:DropDownList ID="mylist" runat="server" OnChange="location='{umbraco.library:NiceUrl($currentPage/@id)}?DeptName='+document.myForm.mylist.options[document.myForm.mylist.selectedIndex].value" style="font-family:Arial;font-size:X-Small;">
        
         <asp:ListItem>-Department-</asp:ListItem>
      <xsl:variable name="topicList" select="umbraco.library:GetPreValues('1107')"/>
                    <xsl:for-each select="$topicList//preValue">    
                           <!-- <option value="{@id}">
                                    <xsl:value-of select="current()"/>
                            </option>-->
                      <asp:ListItem><xsl:value-of select="current()"/></asp:ListItem>
            </xsl:for-each>
     <!-- </asp:DropDownList><br/>-->
      </asp:DropDownList>
      
      
      </form>

    Here is my output in the webpage:

    -Department-AccountingCharteringFinanceHuman ResourcesITManagementOperationTechnicalTraineexxxx

    but i cannot display teh asp:dropdownlist

    any help will be useful

     

     

  • aghy 129 posts 308 karma points
    May 16, 2011 @ 17:21
    aghy
    1

    Hi Max,

    Why do you need to use an DropDownList?

    Could you not use a select box with options?

    Ben

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 16, 2011 @ 17:47
    Jan Skovgaard
    0

    Hi Max

    If you really need to use the .NET control you should consider using a user control for this instead.

    As Ben says you should use a html select box within the XSLT file.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft