Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript in C# code behind

Status
Not open for further replies.

zircon06

Technical User
Jan 8, 2007
81
I have to call different javascript functions in the btnSubmit_click event in code behind based on txtbalancedue value.
If txtbalancedue = 0 then I have to call a js function and capture value. If the value is true then I have to call a update method in code behind.
If txtbalancedue == 1 then I have to call another js function and capture the value. If the value is true then I hve to call insert method from the code behind.
Can anyone suggest what is the best way to do.
Can I use btnSubmit.Attributes.Add("onclick", "return NoBalance();"); I get value second time I hit OK or Cancel button on Javascript confirm box. Not the first time.
 
No. That is what is my problem I want to call from btnSubmit_Click event and capture the value from the function immediately after clicked OK or Cancel from JS confirm function.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top