using xsl for dropdown

Discussion in 'ASP General' started by bic, Jan 16, 2010.

  1. bic

    bic Guest


    I am trying to use xsl output for my and have gotten as far as
    displaying xml control OK. How do I change it to a dropdown using the
    lastname, and when selected I want to have all elements displayed on the
    page. Thanks in advance.

    --this is my file----------------------

    <%@ Page Language="C#" AutoEventWireup="True" %>
    <%@ Import Namespace="System.Xml" %>
    <%@ Import Namespace="System.Xml.Xsl" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    <html >
    <script runat="server">
    void Page_Load(Object sender, EventArgs e)
    XmlDocument doc = new XmlDocument();

    XslTransform trans = new XslTransform();

    xml1.Document = doc;
    xml1.Transform = trans;
    <head runat="server">
    <title>Xml Class Example</title>
    <h3>Xml Example</h3>
    <form id="form1" runat="server">
    <asp:Xml id="xml1" runat="server" />

    --this is my xsl file----------------------

    <?xml version="1.0" encoding="utf-8"?>

    <xsl:stylesheet version="1.0"
    <xsl:template match="/People">
    <xsl:apply-templates select="Person" />

    <xsl:template match="Person">
    <table width="100%" border="1">
    <xsl:value-of select="Name/FirstName" />

    <xsl:value-of select="Name/LastName" />
    <xsl:value-of select="Address/Street" /><br />
    <xsl:value-of select="Address/City" />
    <xsl:value-of select="Address/State" />
    <xsl:value-of select="Address/Zip" />
    Job Title: <xsl:value-of select="Job/Title" /><br />
    Description: <xsl:value-of select="Job/Description" />


    --this is my xml file------------------
    <?xml version="1.0" encoding="utf-8" ?>
    <Street>1800 Success Way</Street>
    <Description>Wears the nice suit</Description>
    bic, Jan 16, 2010
    1. Advertisements

  2. bic

    Bob Barrows Guest

    ***canned wrong-newsgroup reply************************
    There was no way for you to know it (except maybe by browsing through some
    of the previous questions in this newsgroup before posting yours - always a
    recommended practice) , but this is a classic (COM-based) asp newsgroup.
    ASP.Net bears very little resemblance to classic ASP so, while you may be
    lucky enough to find a dotnet-knowledgeable person here who can answer your
    question, you can eliminate the luck factor by posting your question to a
    group where those dotnet-knowledgeable people hang out. I suggest
    microsoft.public.dotnet.framework.aspnet or the forums at
    Bob Barrows, Jan 16, 2010
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
There are no similar threads yet.