3

Possible Duplicate:
Calling javascript from code behind

I wrote a javascript function on asp.net page. This is that..

function Alert(){ alert('hello'); }

I want to call this function from code-behind view. How can I do.

2
  • when do you want to call this function? on click of a button? Commented Jan 31, 2011 at 5:13
  • No, I want to call this with form_Load in vb.net code-behind Commented Jan 31, 2011 at 5:58

1 Answer 1

0

You can use Page.RegisterStartupScript() to setup javascript code to be called on client side page load.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.