asp.net后台与前台的互相调用
一.后台调用前台
1.Page.ClientScript.RegisterStartupScript(type,"",script);
例:
string script = string.Format("<script>alert('Wrong');</script>");
Page.ClientScript.RegisterStartupScript(GetType(), "Load", script);
2.对象.Attributes.Add("事件","script")
例:
e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#ECECFF'");
二.前台调用后台
1.一般没有必要在html文件里调用cs文件.
相关文档:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
private XmlDo ......
由于asp.net 处理进程在machine.config配置文件中的配置为<processModel autoConfig="true" />,这意味着你的asp.net 应用程序使用的性能参数依赖于machine.config的配置。
下面几个参数是自动配置的:
maxWorkerThreads 和 maxIoThreads
minFreeThreads 和 minLocalRequestFreeThreads
minWorkerThreads
max ......
通常javascript代码可以与HTML标签一起直接放在前端页面中,但如果JS代码多的话一方面不利于维护,另一方面也对搜索引擎不友好,因
为页面因此而变得臃肿;所以一般有良好开发习惯的程序员都会把javascript代码放到独立的js文件中,其他页面通过引入该js文件来使用相应的
javascript代码。
今天在做一个小新闻系统的管理 ......
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<system.web>
<authorization>
< ......