当前位置:首页 » 编程博文
开发技术指南» 文章正文
    引言: 第一个例子: include-file-test-1.jsp:
 

 

 ·t-sql extractor    »显示摘要«
    摘要:/****************************************************************************** * author: iret * desc: t-sql extractor * extract the comments and blanks and tabs from the sql statement * 为了比较两个存储过程,或......
    摘要: 还是在写那个数据库应用的输入界面,在为对话框中的控件绑定变量时发现。如果给edit绑定cstring的话虽然能使用mfc的动态数据效换,但是没办法去控制edit的行为。例如,我一开要让这些edit全被disabled掉,只有在开打编辑状态后才能enabled让操作者对edit的内容进行编辑。所以,如果给edit绑定cedit虽然能控制编辑框的行为但不能使用mfc的动态数据交换了。这样要自己写数据......


理解JSP中的include(一):include-file 指令测试

第一个例子:

<%@ page contenttype="text/html;charset=gbk" %> 【程序编程相关:System Mechanic 是个垃圾

include-file-test-1.jsp: 【推荐阅读:在C#中编写多线程应用程序

<%! string dec_str = "dec_str";%> 【扩展信息:如何诊断排除基本的 TCP/IP 问题

<%=dec_str%><br>

<%@ include file="include-file-test-2.jsp" %><br>

<%=dec_str%><br>

include-file-test-2.jsp:

<%@ page contenttype="text/html;charset=gbk" %>

<%

 dec_str = "scr_str";    //eclipse显示出错.

%>

结果:

dec_str

scr_str

结论:file1中定义的实例变量(或局部变量),file2可以引用并更改.但直接访问file2会出错.

 

第二个例子:

include-file-test-1.jsp:

<%@ page contenttype="text/html;charset=gbk" %>

<% scr_str = "hello " + scr_str;%>

<%@ include file="include-file-test-2.jsp" %>

<%=scr_str%><br>

<% temp = "hello " + temp;%>

<%=temp%>

include-file-test-2.jsp:

<%@ page contenttype="text/html;charset=gbk" %>

<%! string scr_str = "scr_str";%>

<% string temp = "temp"; %>

查看file1 对应的servlet:

package org.apache.jsp.jsp_002dsyntax_002dtest;

import ……;


...   下一页
 ·readonly vs. const [c#]    »显示摘要«
    摘要:readonly vs. const [c#] feature: readonly和const都是用来标识常量的。 const可用于修饰class的field或者一个局部变量(local variable);而readonly仅仅用于修饰class的field。 const常量的值必定在编译时就已明确并且恒定的;而readonly常量却有一点不同,那就是其值可以在运行时编译,当......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE