在ASP.NET中,如何实现点击按钮弹出新窗口.刷新父窗口
a.aspx
//显示某个订单的详细信息,通过一个模态对话框,而且屏幕会变颜色
function ShowOrderDetails(orderId) {
var url = "AddMenu.aspx?ID=" + orderId;
var Width="700";
var Height="600";
murl=url;
murl = encodeURI(murl);
var vDialog=window.showModalDialog(murl,window,"dialogWidth:" + Width + "px;dialogHeight:" + Height + "px;center:yes;status:no;scroll:yes;help:no;");
window.location.href =window.location.href; //刷新父窗口
}
</script>
<asp:TemplateField HeaderText="操作" >
<ItemTemplate>
<asp:ImageButton ID="ImageButtonEdit" ImageUrl="~/images/btn/修改.gif" OnClientClick="return confirm('确认要修改数据吗?');" CommandArgument='<%# Eval("NODE_ID") %>' CommandName="Update" Width="15px" Height="15px" runat="server" />
相关文档:
首页:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head ......
=================================<1>页面控制 ======================================
<script type ="text/javascript" src="../js/Calendar.js"charset ="gb2312"></script>
<input ID="Text1" type="text" runat="server" onfocus="calendar()"/>
<!- ......
/// <summary>
/// 得到站点用户IP
/// </summary>
/// <returns></returns>
public
static
string
getUserIP()
{
retu ......
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 decla ......
ajax 在目前 web 领域已广泛应用,其真正核心只不过是一个封装好了的 js 库。最五花八门的莫过于 asp.net 的控件,我个人认为 ajax 只是一个轻量级的东西,根本没有必要将它写成服务器组件,如 ajax.net、AjaxControlToolkit 等。所以我一直视这些组件为垃圾。。。
以下说明我为什么不认同 ajax 的相关组件: ......