funziona su asp.net vs05. so come mostrare i popup, nella mia sintassi sottostante mostro un popup quando una pagina viene caricata. Ma voglio mostrare questo popup dopo che si è verificata qualche azione sul server, ho un pulsante, sotto questo evento pulsante voglio fare un po 'di lavoro sul lato server, quindi voglio mostrare messaggio popup .Qui è la mia sintassi completa che può mostrare pop-upCome mostrare il messaggio popup dal lato server
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
<!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>Untitled Page</title>
<script src="scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script type = "text/javascript">
$(document).ready(function() {
$("#message").fadeIn("slow");
$("#message a.close-notify").click(function() {
$("#message").fadeOut("slow");
return false;
});
});
</script>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div id='message' style="display: none;">
<span>Hey, This is my Message.</span>
<a href="#" class="close-notify">X</a>
</div>
</form>
</body>
</html>
Come la sintassi di cui sopra voglio mostrare un messaggio pop-up dal lato server dopo qualche evento verificarsi .Qui è il mio aspx sintassi:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %>
<!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>Untitled Page</title>
<script src="scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script type = "text/javascript">
function computeCorrectValue(type parameter)
{
$(document).ready(function() {
$("#message").fadeIn("slow");
$("#message a.close-notify").click(function() {
$("#message").fadeOut("slow");
return false;
});
});
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /></div>
</form>
</body>
</html>
C# sintassi:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Default4 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
//want to do some work then want
Button1.Attributes.Add("onclick", "javascript:computeCorrectValue(parameter)");
}
}
Aiutami a mostrare un messaggio popup dopo che si sono verificati alcuni eventi sul server side.popup deve apparire come il mio primo esempio .i può mostrare anche un messaggio di avviso, ma non voglio mostrare messaggio di avviso.url http://stackoverflow.com/questions/659199/how-to-show-popup-message-like-in-stackoverflow
voglio la stessa cosa ma voglio mostrare dopo l'evento del server.
+1 Soluzione piacevole :) – Somebody