作业帮 > 综合 > 作业

英语翻译1.When rendering the HTML,the UpdatePanel looks at its c

来源:学生作业帮 编辑:百度作业网作业帮 分类:综合作业 时间:2024/06/23 04:14:33
英语翻译
1.When rendering the HTML,the UpdatePanel looks at its contents and notices that it contains one control that can trigger a postback—the button.The UpdatePanel adds some JavaScript code that will intercept the button’s Click event on the client and use a JavaScript routine to handle it.
2.When you click the Refresh Time button,you trigger the JavaScript routine.
3.The JavaScript routine doesn’t perform a full-page postback.Instead,it sends a background request to the web server.This request is asynchronous,which means your page remains responsive while the request is under way.
4.The background request is processed in exactly the same way as a normal postback.All the data from all the web controls is sent back to the web server,along with the view state information and any cookies.On the web server,the page life cycle is the same—first the Page.Load event fires,followed by the event that triggered the postback (in this case,Button.Click).If you’re using data source controls such as SqlDataSource,all the normal querying and data binding takes place.The final page is then rendered to HTML and sent back to the page.
5.When the browser receives the rendered HTML for the page,it updates the current view state and grabs any cookies that were returned.
6.The JavaScript routine then replaces a portion of the HTML on the page—just the portion that you wrapped in the UpdatePanel.The rest of the HTML for the page is simply discarded.In the current example,that means the HTML with the animated GIF is tossed out.(This really has no effect,because this part of the HTML is exactly the same in the new response as it was originally.However,it’s important to understand that if you modify this part of your page on the web server,you won’t see the results of your change in the web browser,because that area of the page isn’t being updated.)
英语翻译1.When rendering the HTML,the UpdatePanel looks at its c
1.When rendering the HTML,the UpdatePanel looks at its contents and notices that it contains one control that can trigger a postback—the button.The UpdatePanel adds some JavaScript code that will intercept the button’s Click event on the client and use a JavaScript routine to handle it.
渲染Html的时候,UpdatePanel会检测其自身内容并且注意到其包含了一个可以出发回传的控件:按钮.UpdatePanel会添加一些会拦截按钮客户端单击事件的JavaScript代码,并使用JavaScript程序来处理它.
2.When you click the Refresh Time button,you trigger the JavaScript routine.
当你单击刷新时间按钮的时候,你会触发该JavaScript程序.
3.The JavaScript routine doesn’t perform a full-page postback.Instead,it sends a background request to the web server.This request is asynchronous,which means your page remains responsive while the request is under way.
该JavaScript程序不会执行整页回传.取而代之的是,它向网络服务器发送一个背景请求.该请求是异步的,也就是说当请求正在被执行的时候,你的页面仍然保持可响应状态.
4.The background request is processed in exactly the same way as a normal postback.All the data from all the web controls is sent back to the web server,along with the view state information and any cookies.On the web server,the page life cycle is the same—first the Page.Load event fires,followed by the event that triggered the postback (in this case,Button.Click).If you’re using data source controls such as SqlDataSource,all the normal querying and data binding takes place.The final page is then rendered to HTML and sent back to the page.
背景请求是按照与常规回传完全一样的方式处理的.来自所有网络控件的所有数据被发送回网络服务器,包括视图状态信息以及所有的cookie.在网络服务端,页面生命周期是一样的:首先,Page.Load事件被触发,然后是触发回传的事件.(在本例中即为Button.Click事件)如果你正在使用数据源控件如SqlDataSource控件,所有的常规查询和数据绑定会照常执行.最后的页面被渲染成Html然后被发送回页面.
5.When the browser receives the rendered HTML for the page,it updates the current view state and grabs any cookies that were returned.
当浏览器接收到为页面准备的渲染后的Html,它会更新当前的视图状态,并获取所有返回的cookie.
6.The JavaScript routine then replaces a portion of the HTML on the page—just the portion that you wrapped in the UpdatePanel.The rest of the HTML for the page is simply discarded.In the current example,that means the HTML with the animated GIF is tossed out.(This really has no effect,because this part of the HTML is exactly the same in the new response as it was originally.However,it’s important to understand that if you modify this part of your page on the web server,you won’t see the results of your change in the web browser,because that area of the page isn’t being updated.)
JavaScript程序会取代页面上Html的一部分:就是被你包裹在UpdatePanel中的那部分.页面Html的其他部分会被简单地销毁.在本例中,这意味着包含动态gif图片的Html会被销毁.(这其实没有任何作用,因为这部分的Html与服务端响应的是完全相同的.但是理解这一点十分重要:如果你在服务端修改了你页面的一部分,你不会在浏览器中看到你修改的结果,因为那部分的页面没有被更新)