default.aspx.cs的内容

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace JQueryDialog
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            HtmlGenericControl c = new HtmlGenericControl("span");
            if (Request.Browser.Browser == "IE" && Request.Browser.MajorVersion == 6)
                c.InnerHtml = @"<link rel=""Stylesheet"" href=""Style/jquery-ui-dialog-ie6.css"" type=""text/css"" />";
            else
                c.InnerHtml = @"<link rel=""Stylesheet"" href=""Style/jquery-ui-dialog-other.css"" type=""text/css"" />";

            pl.Controls.Add(c);
        }
    }
}

你可能感兴趣的:(asp)