W
wonderu
Hello!
I try to fire client script from the server after ajaxcall:
--------------------code---------------------
protected void sendButton_Click(object sender, EventArgs e)
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "alertScript",
"<script language=javascript> alert('ewrfef');</script>");
}
---------------------page--------------------
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<atlas:ScriptManager ID="ScriptManager1" runat="server" />
<atlas:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TextBox ID="messageTextBox" runat="server"
Width="660px"></asp:TextBox>
<asp:Button ID="sendButton" runat="server"
OnClick="sendButton_Click" Text="Send" />
</ContentTemplate>
</atlas:UpdatePanel>
</div>
</form>
</body>
</html>
It works: after click on the button, alert appears. But if
EnablePartialRendering==True it doesn't work!!!
What's the problem?
Thank you!
I try to fire client script from the server after ajaxcall:
--------------------code---------------------
protected void sendButton_Click(object sender, EventArgs e)
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "alertScript",
"<script language=javascript> alert('ewrfef');</script>");
}
---------------------page--------------------
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<atlas:ScriptManager ID="ScriptManager1" runat="server" />
<atlas:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TextBox ID="messageTextBox" runat="server"
Width="660px"></asp:TextBox>
<asp:Button ID="sendButton" runat="server"
OnClick="sendButton_Click" Text="Send" />
</ContentTemplate>
</atlas:UpdatePanel>
</div>
</form>
</body>
</html>
It works: after click on the button, alert appears. But if
EnablePartialRendering==True it doesn't work!!!
What's the problem?
Thank you!