My problem is when i clicked on button with id="cmdAddATM" whole .aspx page reload.even though i didnt write any click function associated with it.what is the problem ? becausethis problem is arising some new issues in my project related to ajax/jquery
File Name : AddEditATM.aspx.cs
namespace Monitoring_Tool
{
public partial class AddEditATM : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Generix.fillDropDown(ref litRegion, Generix.getData("dbo.Region", "REGION, Code", "", "", "Code", 1));
}
}
}
File : AddEditATM.aspx
<script language="javascript" type="text/javascript">
$(document).ready(function() {
showAddEditATMLoad();
});
</script>
<body>
// I an not writing full syntax here but i have one button with id "cmdAddATM"
</body>
External JS File :
function showAddEditATMLoad() {
//Its Blank
}
My HTML Code:-
<table style="margin: 0px auto; width: 90%" runat="server">
<thead>
<tr>
<th colspan="4" align="center" class="ui-widget-header PageHeader">
ADD/EDIT ATM
</th>
</tr>
</thead>
<tbody style="vertical-align: bottom; border-style: solid; border-width: thick;">
<tr>
<td style="padding-left: 5px" colspan="2">
Enter ATM ID <input id="txtEditATM" name="txtEditATM" type="text" />
<button id="cmdEditATM">
EDIT ATM</button>
</td>
<td align="left" style="font-weight: bold" colspan="1">
OR
</td>
<td align="center" colspan="2">
<button id="cmdAddATM">
ADD ATM</button>
</td>
</tr>
</tbody>
</table>