两种方法接口aspx页面的编写(页面展示xml文档)

来源:网络 责任编辑:栏目编辑 发表时间:2013-07-01 03:45 点击:

第一种方法:

实例:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="XMLQunar.aspx.cs" Inherits="Byecity2009.Visa.WebApp.XMLQunar" ContentType="text/xml"%>
<%@ Import Namespace="Byecity2009.Visa.Web" %>
<%@ OutputCache VaryByParam="none" Duration="1800" %><?xml version="1.0" encoding="utf-8"?>
<VisaList><asp:Repeater ID="rpAllVisa" runat="server" DataSource="<%# AllVisaViewTable %>"><ItemTemplate>
    <Item Price='<%# ShowPrice_Only(Eval("VisaXml").ToString(),"GuestPrice","CuXiaoPrice") %>' Country='<%# Eval("CountryC_Name") %>' Type='<%# Eval("VisaTypeName") %>' DealCity='<%#Eval("VisaTypeName").ToString().Contains("广州")?"广州":Eval("VisaTypeName").ToString().Contains("上海")?"上海":"北京"%>' ValidityDate='<%# SelectSingleNodeText(Eval("VisaXml").ToString(),"ValidityDate") %>' SettleDay='<%# SelectSingleNodeText(Eval("VisaXml").ToString(),"SettleDay") %>' IntendingDay='<%# SelectSingleNodeText(Eval("VisaXml").ToString(),"IntendingDay") %>' IsExam='<%# SelectSingleNodeText(Eval("VisaXml").ToString(),"IsExam") %>' VisaRequest='<%# BuildVisaRequest( Eval("VisaXml").ToString() ) %>' letter="" Category="<%# GetCategoryStr(Eval("BasicTypeName").ToString()) %>">
        <Confine><%# SelectSingleNodeText(Eval("VisaXml").ToString(),"Confine") %></Confine>
        <Url><%# string.Format( "http://visa.byecity.com/visa-{0}-{1}.html", Eval( "CountryE_Name" ).ToString().ToLower().Replace(" ","_"), Eval( "TypeID" ) )%></Url>
    </Item></ItemTemplate>
</asp:Repeater>
</VisaList>

第二种方法:

实例:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LineDetail.aspx.cs" Inherits="WebInterFace.Group.LineDetail"  ContentType="text/xml" %>

  <%=sbContent %>

 

CreateContect();

function CreateContect(){

  DataSet list = bll.GetGroupInfoListForInterFace(strwhere, " ");

            if (list != null && list.Tables[0].Rows.Count > 0)
            {
                XmlNode node = xml.CreateNode(XmlNodeType.XmlDeclaration, "", "");
                node.InnerText += " encoding=\"utf-8\"";
                xml.AppendChild(node);

               XmlNode dujiasnode = xml.CreateElement("dujia_xianlus");


                        for (int i = 0; i < list.Tables[0].Rows.Count; i++)
                        {
          

    相关新闻>>

      发表评论
      请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
      用户名: 验证码:点击我更换图片
      最新评论 更多>>

      推荐热点

      • 浅析.NET下XML数据访问新机制
      • asp.net 面试+笔试题目第1/2页
      • C# 邮件地址是否合法的验证
      • asp.net 设置GridView的选中行的实现代码
      • C#高级编程:数据库连接[1]
      • 经典C++程序1
      • IIS 自动回收导致后台定时器失效的问题解决
      • ASP.NET&#160;GridView列表代码示例
      • Asp.net MVC源码分析--Action Filter的链式调用
      网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索
      Copyright © 2008-2015 计算机技术学习交流网. 版权所有

      豫ICP备11007008号-1