asp.net wap 2.0 实现 ishtml32 下 加载 css文件
使用asp.net 开发wap 网站,在ishtml32下,如果手机浏览器支持ishtml32,但是 SupportsCss=False 时,想加载css文件时,采用重写mobile:form的方法来实现
using System;
using System.Configuration;
using System.Web.UI.MobileControls;
using System.Web.UI.MobileControls.Adapters;
public class MyForm : Form
{
public string CssPath
{
get
{
if( ViewState["CssPath"] != null)
return (string)ViewState["CssPath"];
else
return string.Empty;
}
set
{
ViewState["CssPath"] = value;
}
}
}
//Now Create the Form Adapter
public class HtmlMyFormAdapter : HtmlFormAdapter
{
protected new MyForm Control
{
get
{
return (MyForm)base.Control;
}
}
protected override bool RenderExtraHeadElements( HtmlMobileTextWriter writer )
{
if( writer != null )
{
if( this.Control.CssPath.Length > 0 )
&n
相关文档:
<form action="" method="post">
<table border="1">
<tr>
<td width="40">用户名</td>
<td> <input name="username" size="5" maxlength="8" /> </td>
</tr>
<tr>
<td width="40">密码</td&g ......
Web前端
网页设计中CSS布局是很重要的部分,下面介绍几种检查调试CSS布局的有效方法。
1. 检查HTML元素是否有拼写错误、是否忘记结束标记
即使是老手也经常会弄错div的嵌套关系。可以用dreamweaver的验证功能检查一下有无错误。
2. 检查CSS是否书写正确
检查一下有无拼写错误、是否忘记结尾的 ......
.inputbox {
padding-left: 2px;
border-top: 1px solid #9AA587;
border-right: 1px solid #DDDDDD;
border-bottom: 1px solid #DDDDDD;
border-left: 1px solid #9A ......
//default.aspx.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Runtime.InteropService ......