c# create html table test
string html = "<html><head><title>44444444</title>";
html += @"<style type='text/css'>
table {
border-collapse: collapse;
border: none;
width: 200px;
} td {
border: solid #000 1px;
}
</style>"; html+="</head><body>\r\n<table><tr style='color:#777;background: #eaeaea;'><td>aaaa</td><td>bbbb</td>"; if (exportOptionCtl1.checkBox1.IsChecked == true) {
html += "<td>" + exportOptionCtl1.checkBox1.Tag + "</td>";
}
if (exportOptionCtl1.checkBox2.IsChecked == true)
{
html += "<td>" + exportOptionCtl1.checkBox2.Tag + "</td>";
}
if (exportOptionCtl1.checkBox3.IsChecked == true)
{
html += "<td>" + exportOptionCtl1.checkBox3.Tag + "</td>";
}
if (exportOptionCtl1.checkBox4.IsChecked == true)
{
html += "<td>" + exportOptionCtl1.checkBox4.Tag + "</td>";
}
if (exportOptionCtl1.checkBox5.IsChecked == true)
{
html += "<td>" + exportOptionCtl1.checkBox5.Tag + "</td>";
} html += "</tr>"; for (int i = 0; i < 109; i++) { html += "<td>aaaaa" +i + "</td>";
html += "<td>bbbbb" + i + "</td>";
if (exportOptionCtl1.checkBox1.IsChecked == true)
{
html += "<td>" + exportOptionCtl1.checkBox1.Tag + "</td>";
}
if (exportOptionCtl1.checkBox2.IsChecked == true)
{
html += "<td>" + exportOptionCtl1.checkBox2.Tag + "</td>";
}
if (exportOptionCtl1.checkBox3.IsChecked == true)
{
html += "<td>" + exportOptionCtl1.checkBox3.Tag + "</td>";
}
if (exportOptionCtl1.checkBox4.IsChecked == true)
{
html += "<td>" + exportOptionCtl1.checkBox4.Tag + "</td>";
}
if (exportOptionCtl1.checkBox5.IsChecked == true)
{
html += "<td>" + exportOptionCtl1.checkBox5.Tag + "</td>";
}
html += "</tr>\r\n"; } html += "</table></body></html>"; StreamWriter w= File.CreateText("d:\\wx.html"); w.Write(html);
w.Flush();
w.Close();
<Grid x:Class="TestWpfApplication.ExportOptionCtl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="77" d:DesignWidth="417">
<Grid> <CheckBox Content="CheckBox1" Tag="ddd" Height="16" HorizontalAlignment="Left" Margin="6,6,0,0" Name="checkBox1" VerticalAlignment="Top" />
<CheckBox Content="CheckBox2" Tag="eee" Height="16" HorizontalAlignment="Left" Margin="91,6,0,0" Name="checkBox2" VerticalAlignment="Top" />
<CheckBox Content="CheckBox3" Tag="fff" Height="16" HorizontalAlignment="Left" Margin="167,6,0,0" Name="checkBox3" VerticalAlignment="Top" />
<CheckBox Content="CheckBox4" Tag="ggg" Height="16" HorizontalAlignment="Left" Margin="248,6,0,0" Name="checkBox4" VerticalAlignment="Top" />
<CheckBox Content="CheckBox5" Tag="hhh" Height="16" HorizontalAlignment="Left" Margin="6,37,0,0" Name="checkBox5" VerticalAlignment="Top" /> </Grid>
</Grid>
c# create html table test的更多相关文章
- when create a table,then show error ora-00952 tablespace tsb_1 not exist
QUESTION:When create a table,then show error ora-00952 tablespace tsb_1 not exist. STEP: 1.select us ...
- IDEA的SonarLint插件报错Unable to create symbol table for
执行sonarLint 报错: Unable to create symbol table for ***File won't be refreshed because there were erro ...
- SonarQube执行代码分析时,报错ERROR: Unable to create symbol table for : /**/*.java java.lang.IllegalArgumentException: Unsupported class file major version 55
若要转载本文,请务必声明出处:https://www.cnblogs.com/zhongyuanzhao000/p/11686633.html 起因: 最近正在尝试SonarQube的简单使用,但是当 ...
- ORA-31633:unable to create master table "DP.SYS_EXPORT_FULL_11" ORA-01658
问题描述:在进行数据泵进行数据库备份的时候,但是导出命令报错,环境是19C 4节点的rac 一体机.目前磁盘空间需要清理,清理之前先备份一下数据库 ORA-31626:job does not exi ...
- DB2 create partitioned table
在Z上和开放平台上的创建方法还不太一样,两套人马开发出来的就是牛! 蛋疼…… 贴不同类型的几个例子感受一下,Z上的ASC,DESC不见了: CREATE TABLE foo(a INT) PARTIT ...
- CMD Create Database & Table
Just do it: /* SQL 创建库 CREATE DATABASE jsp_demo DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; ...
- MySQL中临时表的基本创建与使用教程(create temporary table )
当工作在非常大的表上时,你可能偶尔需要运行很多查询获得一个大量数据的小的子集,不是对整个表运行这些查询,而是让MySQL每次找出所需的少数记录,将记录选择到一个临时表可能更快些,然后在这些表运行查询. ...
- sqlalchemy create single table
User.__table__.drop(engine) User.__table__.create(engine) https://stackoverflow.com/a/45287771/80250 ...
- 【SQL篇章--CREATE TABLE】
[SQL篇章][SQL语句梳理 :--基于MySQL5.6][已梳理:CREATE TABLE][会坚持完善] SQL : 1. Data Definition Statements: 1.3 CRE ...
随机推荐
- 开始记录 Windows Phone 生涯
已经快接近三年没有更新博客了,最近打算把博客这块从新建设起来. 由于工作原因,现在已经很久没有接触过Android了.目前工作是全力 Windows Phone,并且也已经工作一年半了,以后会陆续把之 ...
- Asp.net Mvc身份验证
1.安装组件 Microsoft.AspNet.Identity.Core,身份认证核心组件 安装Microsoft.AspNet.Identity.EntityFramework,EF实现身份认证 ...
- Postgresql - jsonb_pretty & dateStyle
1. SHOW datestyle; DateStyle ----------- ISO, MDY(1 row) INSERT INTO container VALUES ('13/01/2010') ...
- 11LaTeX学习系列之---LaTeX的特殊字符
目录 目录 前言 (一)源代码 (二)输出效果 目录 本系列是有关LaTeX的学习系列,共计19篇,本章节是第11篇. 前一篇:10LaTeX学习系列之---Latex的文档结构 后一篇:12LaTe ...
- ubuntu 14.04安装zabbix3.0以及汉化
文章出处借鉴于 http://www.cnblogs.com/-10086/p/5317524.html 1.下载deb # wget http://repo.zabbix.com/zabbix/3. ...
- IntelliJ IDEA 2017 激活
http://idea.lanyus.com/ 直接获取注册码 或者复制,在license server中添加: http://intellij.mandroid.cn/ http://idea.im ...
- JdbcTemplate介绍<二>
引言 如果说JdbcTemplate类是Spring Jdbc的核心类,那么execute方法算得上Spring Jdbc的核心方法了,毕竟JdbcTemplate的很多public方法内部实际上是调 ...
- ajax 数据类型结构
- UVA10562-Undraw the Trees(递归)
Problem UVA10562-Undraw the Trees Accept: 1199 Submit: 8397 Time Limit: 3000 mSec Problem Descripti ...
- WINS服务器与DNS服务器有什么区别?
1.WINS实现的是IP地址和计算机名称的映射,DNS实现的是IP地址和域名的映射.2.WINS作用的范围是某个内部网络,DNS的范围是整个互联网.简单说明一下:WINS实现的是IP地址和计算机名称的 ...