i can write methods like that
public void CompareEmail()
{
some code
}
public void UpdateEmail()
{
some code
}
public void InsertEmail()
{
some code
}
i am click the button onclientclick call the function like that
<asp:Button ID="btnSendNow" runat="server" CssClass="invdisp_btn" OnClick="btnSendNow_Click"
Text="Send Now" OnClientClick="return getEmailMessage()" />
java script function is like that
<script type="text/javascript" language="javascript">
function getEmailMessage()
{
var LoginID = document.getElementById('hdn').value;\\ i can pass 1 or 0
if (LoginID != 0)
{
//This place using CompareEmail() method How to write code comapare values not matching ask update confirm box
var ans;
ans = window.confirm('DO u want to update?');
if (ans == true)
{
// control.UpdateEmail();\\how to call UpdateMethod in .cs file
alert('updated');
}
else {
return false;
}
}
else {
var ans;
ans = window.confirm('DO u want to Insert values?');
if (ans == true)
{
PageMethods.InsertEmail();\\how to call InsertMethod in .cs file
// control.InsertEmail();
alert('Inserted');
}
else
{
return false;
}
}
}
</script>
how to write the code in java script function call the .cs file methods pls help me
Thank u
hemanth
You should try Pagemethods and ASP.net Ajax.