<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>JQuery Show / Hide Div panels in asp.nettitle>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js">script>
<script type="text/javascript">
$(document).ready(function() {
$("#lnkbtn").click(function() {
if ($('#divreg').is(":hidden")) {
$('#divreg').show(500);
document.getElementById('lnkbtn')[removed] = "Hide";
} else {
$("#divreg").hide(500);
document.getElementById('lnkbtn')[removed]="Show";
}
});
});
script>
head>
<body>
<form id="form1" runat="server">
<table>
<tr>
<td><asp:LinkButton ID="lnkbtn" runat="server"><b>Hideb>asp:LinkButton> td>
tr>
<tr>
<td>
<div id="divreg">
<table style="border:1px solid #000">
<tr>
<td colspan="2"><b>Registration Detailsb>td>
tr>
<tr>
<td>UserName:td>
<td><asp:TextBox ID="txtUser" runat="server"/>td>
tr>
<tr>
<td>Password:td>
<td><asp:TextBox ID="TextBox1" runat="server"/>td>
tr>
<tr>
<td><asp:RadioButtonList ID="rdbtnGender" runat="server">
<asp:ListItem>Maleasp:ListItem>
<asp:ListItem>Femaleasp:ListItem>
asp:RadioButtonList>td>
tr>
table>
div>
td>
tr>
table>
form>
body>
html>
If you observe above code in header section I added one script file by using that file we can show or hide div or table content elements using JQuery.