C#创建XML
1 using System;
2 using System.Collections;
3 using System.Configuration;
4 using System.Data;
5 using System.Linq;
6 using System.Web;
7 using System.Web.Security;
8 using System.Web.UI;
9 using System.Web.UI.HtmlControls;
10 using System.Web.UI.WebControls;
11 using System.Web.UI.WebControls.WebParts;
12 using System.Xml.Linq;
13 using System.Xml;
14
15 namespace WEB
16 {
17 public partial class test : System.Web.UI.Page
18 {
19 protected void Page_Load(object sender, EventArgs e)
20 {
21 XmlDocument doc = new XmlDocument();
22 XmlDeclaration dec = doc.CreateXmlDeclaration("1.0", "GB2312", null);
23 doc.AppendChild(dec);
24 //创建一个根节点(一级)
25 XmlElement root = doc.CreateElement("First");
26 doc.AppendChild(root);
27 //创建节点(二级)
28 XmlNode node = doc.CreateElement("Seconde");
29 &n
相关文档:
1 父类 partial class FormBillTemplet:Form
/// <summary>
/// 新单
/// </summary>
/// <param name="s ......
1 JavaScript发送邮件
<script language="javascript">
function SendMail() {
document.location = "mailto:seat@wicresoft.com;?subject=Feedback";
&n ......
public void ExportControl(System.Web.UI.Control source, string DocumentType, string filename)
{
//设置Http的头信息,编码格式
HttpContext.Current.Response.Buffer = true;
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ClearContent();
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
//sqlserver身份验证
//string sqlconn = "ser ......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
//sqlserver身份验证
//s ......