Combine Javascript and ASP.Net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amitdotchauhan
    New Member
    • Jan 2010
    • 5

    #31
    simplest way

    simplest way i would do is

    i will registerclient script block like

    Code:
    str="function add() { ";
    str+="var TB1=document.getelementbyid('"+ textbox1.ClientID +"').value;";
    str+="var TB2=document.getelementbyid('"+ textbox2.ClientID +"').value; ";
    str+="var LB1=document.getelementbyid('"+ label1.ClientID +"'); ";
    str+="LB1.value=TB1+TB2;}"
    once this is registered just i need to attach this function on textbox's blur event
    i.e. set the onclientclick=" return Add()"

    Ready to go!!

    Comment

    Working...