How to use JavaScript?

  • Thread starter Thread starter ruca
  • Start date Start date
R

ruca

How can I use JavaScript with my ASPX page wicth is using VB programming?

I have a javascript clock that want ot use in my page, but don't
 
JavaScript is client-side scripting, embedded in the HTML of a page, and
runs in the browser. VB.Net is server-side programming which creates the
HTML in the page. You use JavaScript in an ASP.Net page the same way you
would in a static HTML page. You can use your server-side programming to
generate the JavaScript and add it to the page if you wish.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
If you are referencing an external JS file you can do it just like you do in
any page.
<script language="javascript" src="myJS.js"></script>

if you need to make a call from a link or button or something then you can
add an attribute to the control.

myControl.Attribute.Add("onclick","myJSFunction();")

You can also look up "RegisterClientScriptBlock" and/or
"RegisterStartupScript".

-Stanley
 
Yes I have a JS file, where I have show_clock function to call. I calling
her like this<body onload="show_clock()">, but nothing happens. The clock
don't appear.

In your opinion what should I do? Use "RegisterClientScriptBlock" and/or
"RegisterStartupScript".? If yes, how can I use them?


--

Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca
 
Back
Top