|
|
|
ต้องการ alert หลังจาก update เสร็จแล้ว ว่าได้ทำการ update ข้อมูลเรียบร้อยแล้วค่ะ asp.net c# |
|
|
|
|
|
|
|
Code (C#)
using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, System.EventArgs e)
{
string myscript = "alert(document.getElementById('TextBox1').value);";
Page.ClientScript.RegisterStartupScript(this.GetType(), "myscript", myscript, true);
}
protected void Button1_Click(object sender, System.EventArgs e)
{
string strMessage = null;
strMessage = "Hi, You clicked ClickMe button";
//finishes server processing, returns to client.
string strScript = "<script language=JavaScript>";
strScript += "alert(\"" + strMessage + "\");";
strScript += "</script>";
if ((!ClientScript.IsStartupScriptRegistered("clientScript"))) {
ClientScript.RegisterClientScriptBlock(this.GetType(), "clientScript", strScript);
}
}
}
|
|
|
|
|
Date :
2011-05-24 10:20:29 |
By :
nologin |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|