易截截图软件、单文件、免安装、纯绿色、仅160KB

How postback works in ASP.NET

Introduction
In this article, we will take a closer look at how ASP.NET pages post back to themselves, and how to customize this feature in our web applications.
function __doPostBack(eventTarget, eventArgument)
One of the most important features of the ASP.NET environment is the ability to declare controls that run on the server, and post back to the same page. Remember the days of classic ASP? We would create a form which would accept the user's input, and then we would most probably have to create another page that would accept all those inputs, either through HTTP GET or POST, and perform some kind of validation, display and action. Sometimes, even a third page was necessary to perform our actions. This wasted a lot of time and complicated things when you had to make a change. But of course, this is not necessary any more with ASP.NET. There is no need to create second pages that accept the inputs of the first, process them and so on. Form fields and other controls can be declared to run on the server, and the server simply posts the page back to itself and performs all the validation, display and actions. Our life as web developers has become a million times better. But how exactly is this done?
When a control is declared to run on the server, a VIEWSTATE is created which remembers the ID of that control, and the method to call when an action is performed. For example, let's say we input this HTML on a page:
1
<script language="VB" runat="server">
2
Sub Test_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
3
    'enter your code to perform
4
End Sub
5
</script>
6
<html>
7
<body>
8
    <form runat="server" id="myForm">
9
        <asp:linkbutton id="Test" runat="server" text="Create Text file" onclick="Test_Click" />
10
    </form>
11
</body>
12
</html>
&n


相关文档:

ASP.NET的ACCESS数据库操作类

//private string datapatch = ConfigurationSettings.AppSettings["acessconn"];//数据库地址 
private string datapatch = "db/global.asa";//数据库地址 
/// 
/// 取得dataset 
// 
/// 查询语句 
/// 
public DataSet GetDataSet(string Commandtext) 
{&nbs ......

ASP.NET配置Oracle的相关说明

²        Oracle9i的安装,请参照官方的安装说明。
²        Oracle9i安装成功以后,使用管理员(用户名:sys、密码:sys)的身份登录进去,创建一个用户ddymis,密码:ddymis,角色默认赋予dba。
²      ......

ASP.NET Web 应用程序的布局

ASP.NET 应用程序必须位于 IIS 虚拟目录(也称为应用程序根目录)中。ASP.NET 应用程序可包含已编译的程序集(通常是包含业务逻辑的 DLL 文件)、用于存储预编译代码的已知目录(目录名总是 \Bin)、存储在基于文本的、易读的 Web.config 文件中的配置设置、页、服务器控件,以及 XML Web 服务。
服务器中任何不与其他应用 ......

asp.net常有小方法整理

  =================================<1>页面控制  ======================================
 <script type ="text/javascript"  src="../js/Calendar.js"charset ="gb2312"></script>
  <input ID="Text1" type="text" runat="server" onfocus="calendar()"/>
<!- ......

asp.net文件和文件夹压缩

法一:调用winrar
using Microsoft.Win32;
using System.Diagnostics;
protected void Button1_Click(object sender, EventArgs e)
    {
        RAR(@"E:\95413594531\GIS", "tmptest", @"E:\95413594531\");
    }
    /// < ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号