Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
can we call our java script function from code behind???

and plz help me can i change the title of this confermation box.
recently it is displaying
The Page At LocalHost says:

i dont wana use this title i want to use my own title.
how can i do this?
Posted

1 solution

yes can call javascript function from code behind :
C#
protected void Page_Load(object sender, EventArgs e)
  {

      if (!IsPostBack)
      {
           btnSend.Attributes.Add("onclick", "return fnTest()");
      }
 }
 
Share this answer
 
Comments
sunandandutt 4-Oct-12 6:52am    
Good One. My 5!
prince_rumeel 4-Oct-12 8:05am    
and plz help me can i change the title of this confermation box.
recently it is displaying
The Page At LocalHost says:
solanki.net 4-Oct-12 8:11am    
if u r using javascript then i think we cant change .
prince_rumeel 5-Oct-12 1:15am    
bu thing there is a way to change the title of the error message.if u call our javascript from code behind
solanki.net 5-Oct-12 1:27am    
can u explain how ?

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