I want to give a message to user in pop up depends on his role from code behind.
All my controls are in update panel.
Here is my samplecode
but First time when i click the button1 the message display one time only.
If i click the second time the message coming twice.Even when i click the button2 that time also the message coming.
That means every time of asynchronous call the message will be displaying.But what i want is the message will be display only once when i click the button1 .I dont want message when i click any other controls.
<
telerik:RadCodeBlock ID="RadCodeBlock" runat="server">
<script language="javascript" type="text/javascript" >
function openwindow(test)
{
alert(test);
}
</script>
</telerik:RadCodeBlock>
<table><tr><td>
<div style="text-align:center; width:600px">
</div></td></tr></table>
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Style="position: static"
Width="696px">
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Style="position: static"
Text="Button" Width="128px" />
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Style="position: static"
Text="Button" Width="136px" /></telerik:RadAjaxPanel>
protected void Button1_Click(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(Page, typeof(Page), "RadAlertScript", "Sys.Application.add_load(function(){openwindow('test');});", true);
}
protected void Button2_Click(object sender, EventArgs e)
{
}