Aspx page Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JScript.aspx.cs" Inherits="Javascript.JScript" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>My Page</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
function Test() {
alert("hi");
$("#trOpen").show();
}
function MyFunction() {
alert("This
is another function");
}
</script>
</head>
<body>
<form id="form2" runat="server">
<table>
<tr><td>
<asp:RadioButtonList ID="rbtntest" runat="server" onchange="Test()">
<asp:ListItem>ram</asp:ListItem>
<asp:ListItem>Sri</asp:ListItem>
<asp:ListItem>Sriram</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr id="trOpen"style="display:none">
<td>
<asp:Button ID="MyButton" runat="server" Text="Ok" OnClick="MyButton_Click" />
</td>
</tr>
</table>
</form>
</body>
</html>
Server side Code:
protected void MyButton_Click(object sender, EventArgs e)
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "myScript", "MyFunction();", true);
}