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
Ïà¹ØÎĵµ£º
IEºÍFF¶ÔºÐÄ£Ð͵ĽâÊÍÇø±ð
IEºÍFF¶ÔºÐÄ£Ð͵ĽâÊÍÒ²²»Ò»Ñù£¬´úÂë˵Ã÷£º#test { width: 650px !important;width: 648px;padding-left:2px;background:#fff; }
test ÏÔʾµÄ¿í´øÊÇ 650px
IE BoxµÄ×Ü¿í¶ÈÊÇ£º width+padding+border+margin¿í¶È×ܺÍ
FF BoxµÄ×Ü¿í¶È¾ÍÊÇ widthµÄ¿í¶È£¬padding+border+marginµÄ¿í¶ÈÔÚº¬ÔÚwidthÄ ......
ÔÀ´ÓÃjQueryµÄajax·½Ê½µ÷ÓÃasp.netÒ³Ãæ»ù±¾¶¼Êǵ÷Óõ¥¸öÒ³Ãæ£¬Óɵ÷ÓÃÒ³ÃæResponseÄÚÈÝ£¬¶øÏÖÔÚ²ÉÓÃasp.net ajaxºó£¬ÎÒÃÇÔò¿ÉÒÔ¸üÍêÃÀµÄʹÓÃjQueryºÍasp.net½áºÏÁË£¬´úÂëÈçÏ£º
<asp:ScriptManager ID="ScriptManager1" runat="server" >
<Scripts>
<asp:ScriptReference Path="http ......
ºÜ¶àµØ·½¶¼Ó¦Óõ½Í¼Æ¬ÉÏ´«¹¦ÄÜ£¬ÄÇô¾¿¾¹ÔõÑù¿ÉÒÔʵÏÖÄØ?ÏÂÃæÎÒÀ´¸ø´ó¼Ò½øÐн²½â
ÔÚvisual studioÖÐ×Ô´øµÄÒ»¸ö¿Ø¼þfileupload£¬¿ÉÒÔʵÏִ˹¦ÄÜ£¬ÎÒÒª¸ø´ó¼Ò½éÉܵÄÊÇËüµÄÓ÷¨¡£
Ê×ÏÈҪн¨Ò»¸öÍøÒ³£¨ÏÂÃæÊÇÎÒ´´½¨ºÃµÄÒ»¸öÍøÒ³£©
ÔÚÍøÒ³ÖÐÍϽøfileupload¿Ø¼þ£¬ºóÃæ·ÅÒ»¸öÉÏ´«°´Å¥
ÕâÑù£¬µ±ÎÒÃǵã»÷ÉÏ´«°´Å¥Ê±£¬Í¼ ......
<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 ......