Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

HTML:MESSAGES,HTML:ERRORS,Ó÷¨


=======<html:messages>============
Action ÖÐ :
    ActionMessages message = new ActionMessages();
    message.add(" ÏûÏ¢¾ä±ú ",new ActionMessage(" ×ÊÔ´ÎļþÖÐ Key Öµ ",String ÀàÐÍÃèÊöÐÅÏ¢ ));
    this.addMessages(request,message);
    return ActionForward;
JSP Ò³ÃæÖÐ :
    <html:messages id=" Ö¸¶¨Ê¹ÓÃÏûÏ¢µÄ±êʶ " property=" ÏûÏ¢¾ä±ú " message="true|false">
       <bean:write name=" ÒÔÉÏËùÖ¸ ID ±êʶ "/>
    </html:messages>
==========<html:errors>==============
Action ÖÐ :
    ActionMessages message = new ActionMessages();
    message.add(" ÏûÏ¢¾ä±ú ",new ActionMessage(" ×ÊÔ´ÎļþÖÐ Key Öµ ",String ÀàÐÍÃèÊöÐÅÏ¢ ));
    this.saveErrors(request,message);
    return ActionForward;
JSP Ò³ÃæÖÐ :
    <html:errors property=" ÏûÏ¢¾ä±ú "/>
Èç¹ûActionÖÐÕâÑùÉ趨(false)£¬Ò³ÃæµÄÌáʾÐÅÏ¢½«²»´Ó×ÊÔ´ÎļþÀï¶ÁÈ¡:
    ActionMessages message = new ActionMessages();
    message.add("ÏûÏ¢¾ä±ú",new ActionMessage("StringÀàÐÍÃèÊöÐÅÏ¢",false));
    this.saveErrors(request,message);
    return ActionForward;
JSPÒ³Ãæ:
    <html:errors/>»ò<html:errors property="ÏûÏ¢¾ä±ú"/>


Ïà¹ØÎĵµ£º

´ÓÊý¾Ý¿âÖÐȡֵÅúÁ¿Éú³ÉhtmlÎļþ

1. web.config
<connectionStrings>
<add name ="myconn" connectionString="Data Source=who\SQLEXPRESS; Initial Catalog=dbname;Integrated Security=True;" providerName="System.Data.SqlClient"/>
</connectionStrings>
2.
string htmlPath = "D:\\htmlFiles";
......

HTML Îļþ´«ÊäÒ³Ãæ

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta NAME="Copyright" CONTENT="">
<meta http-equiv="Content-Type" content="text/html; charset=u ......

HTMLÖÐÁ´½Ó´ò¿ªµÄ´°¿Ú

_blank   :   ÔÚÒ»¸öеģ¬Ã»ÓÐÃüÃûµÄ´°¿ÚÖдò¿ªÖ¸¶¨Îĵµ
_self      :   ÔÚµ±Ç°´°¿ÚÖдò¿ªÎĵµ
_parent :   ÔÚ¸¸´°¿ÚÖдò¿ªÎĵµ£¬µ±Ã»Óи¸´°¿Úʱ£¬_parentÓë_selfÊÇÒ»ÑùµÄ
_top      £º ÔÚµ±Ç°´°¿ÚÖдò¿ªÎĵµ£¬²¢ÇÒ´ò¿ªµÄÎ ......

ÓÃC#ʵÏÖ½«HTMLÎļþת»»ÎªCHMÎļþ(ת)

ÕâЩÌìÒòΪ¹¤×÷ÐèÒª£¬Òª½«Ò»Ð©htmlÎļþת»»ÎªchmÎļþ£¬µ±È»ÊÇÐèÒªºÍ³ÌÐò½áºÏÔÚÒ»Æð¡£
ºóÀ´ÕÒµ½NDoc£¬ÀïÍ·ÓÐÒ»¶Î´úÂëÊÇÏà¹ØµÄ£¬ÓÚÊÇ¿ªÊ¼·ÖÎö´úÂ룬дÍêÖ®ºó£¬×ܽ᣺Ö÷ÒªÊÇÀûÓÃ΢ÈíµÄhhc.exeÀ´±àÒëhtmlÎļþ£¬³ÌÐòÐèÒª½«¾ßÌåµÄÊý¾ÝдÈëhhpºÍhhcÎļþ¡£
Ö÷Òª´úÂëÈçÏ£º
¸´ÖÆC#´úÂë±£´æ´úÂëpublic void CompileProject()
{ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ