ATLAS. Fire client script from server after ajaxcall

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top