Click here to Skip to main content
15,891,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
JavaScript
<script type="text/javascript">
  
  function here()  
  {
     return(confirm("YOU WANT"));  
  }
  
</script>

this is my text box ...
JavaScript
<asp:TextBox ID="TextBox1" Onchange="return here()" runat="server"
       AutoPostBack="True" ontextchanged="TextBox1_TextChanged">

and this is my cs code
C#
protected void TextBox1_TextChanged(object sender, EventArgs e)
    {
        Response.Write("i will peroform data base task");
 
    }

now my problem is ... my javascript function returning true then also my .cs page function is not calling....

What I have tried:

now my problem is ... my javascript function returning true then also my .cs page function is not calling....
Posted
Updated 31-Mar-16 1:39am
v2

1 solution

remove the return keyword

ASP.NET
<asp:TextBox ID="TextBox1" Onchange="here();" runat="server" AutoPostBack="True" OnTextChanged="TextBox1_TextChanged">
   </asp:TextBox>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900