一段ASP。NET的IFRAME的页面跳转
<script>window.parent.document.getElementById('BIframe').src='B.aspx';</script>
http://www.cnblogs.com/lijigang/archive/2007/05/18/751943.html
再来看看第二种刷新方法:“重载页面”
<script>window.parent.document.frames.BIframe.RefreshmyForm();</script>
<script language="javascript" type="text/javascript">
14 function RefreshmyForm()
15 {
16 var myForm = document.Form1;
17 myForm.submit();
18 }
19 </script>
那么有人就会问了,如何在Iframe的页面中来刷新父页面呢?
我们仍然在C.aspx页面中做这个事情,加入“Button3”,Text属性为“重定向A.aspx页面”,C.aspx的脚本代码我们在这里省略。子页C.aspx的后台代码:
主要关心Button3的Click事件
1 private void Button3_Click(object sender, System.EventArgs e)
2 {
3 this.Response.Write("<script>window.parent.location=window.parent.location;</script>");
4 }
相关文档:
ASP编程中20个非常有用的例子
1.如何用Asp判断你的网站的虚拟物理路径
答:使用Mappath方法
<%= Server.MapPath("\")%>
2.我如何知道使用者所用的浏览器?
答:使用the Request object方法
strBrowser=Request.ServerVariables("HTTP_USER_AGENT")
If Instr(strBrowser,"MSIE") & ......
<%
Function gen_key(digits)
'Create and define array
dim char_array(50)
char_array(0) = "0"
char_array(1) = "1"
char_array(2) = "2"
char_array(3) = "3"
char_array(4) = "4"
char_array(5) = "5"
char_array(6) = "6"
char_array(7) = "7"
char_array(8) = "8"
char_array(9) = "9"
char_array( ......
首先,他们的运行机制不同。asp是属于一种解释型的框架!是解释执行的,是脚本。asp.net是编译型的!最终会编程二进制的机器代码。从这一点来说,asp.net执行效率上要比asp高!
其次,asp只允许使用js或者vbs。而asp.net则不一样,只要符合公共语言运行库规范的语言,都可以使用!从这一点上来说,asp在底层操作上较asp.ne ......
asp连接access和mssql的万能代码:
'解决了ACCESS数据库路径的问题!
'采用DBType=0或DBType=1来区分AC库还是MSSQL库
'具体采用AC库时应注意的事项,请看程序说明
-----------------------------------------------
Dim DBType,Conn,StrConn
DBType=0 '0为Access数据库,1为MSSQL数据库
If(DBType=0) Then
......
IIS无法访问asp!
解决办法!今天打开电脑发现IIS无法访问asp页面。
提示:Server Application Error 然后就有了下面的一段话。
The server has encountered an error while loading an application during the processing of your request. Please refer to the event log for more detail information. Please contact ......