62,073
社区成员
发帖
与我相关
我的任务
分享
var id = -1;
function GetID(sender, args) {
id = args.getDataKeyValue("UserId");
}
function OpenDetail() {
if (id == -1) {
window.alert("请选择相关数据!");
}
else {
var oWnd = radopen("UserManagement_Detail.aspx?id=" + id, "RadWindowManager1");
oWnd.setSize(750, 500);
}
}
function OpenUpLoadExcalUserId() {
var oWnd = radopen("UserManagement_Import.aspx", "RadWindowManager1");
oWnd.setSize(800, 500);
}
function Cancela1(args) {
if (!args) {
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
alert("数据更新成功!");
}
}
function SetID() {
id = -1;
}
Page
<%@ 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 runat="server">
<title ></title >
<script type ="text/javascript">
function test(name) {
eval(sayHello.replace( new RegExp( "Name", "g" ), name));
}
</script >
</head>
<body>
<form id ="form1" runat ="server">
<div >
<input type ="button" onclick ="test('Byron');" value ="Click" />
</div >
</form >
</body>
</html>
Code
using System;
using System.Web.UI;
public partial class _Default : System.Web.UI.Page , IPostBackEventHandler
{
public void RaisePostBackEvent( string eventArgument)
{
Response.Write( "Hello "+eventArgument+"!\r\n" );
}
protected override void OnPreRender( EventArgs e)
{
PostBackOptions pbo = new PostBackOptions (this , "Name" , "" , false , false , false, true , false , "" );
string clientScript = Page.ClientScript.GetPostBackEventReference(pbo);
Page.ClientScript.RegisterStartupScript( typeof( _Default), "registerScript", "var sayHello=\"" + clientScript + "\";\r\n", true );
base.OnPreRender(e);
}
}
setInterval("redirect()", 1000);
function redirect() {
location.href=location.href
}