两种方法接口aspx页面的编写(页面展示xml文档)
第一种方法:
实例:
<%@ 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++)
{
 
相关新闻>>
- 发表评论
-
- 最新评论 更多>>