asp.net and Javascript

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

This is a simple question I think but I am unsure. Is it possible to combine
ASP.NET scripting and JavaScript on the one page but with separate <script>
tags?

Thanks Heaps



Wade H
 
Sure...ASP.NEt has a <script runat="server" language="XX">

and Javascript has a <script language="javascript"> with no runat="server"

ASP.Net only processes stuff in <% or <script runat="server"> the rest (ie,
html and javascript) gets set to the browser to do with as it pleases.

Simplest solution to your question is to try it ;)

Karl
 
Sure.

<script language="c#" runat="server"> starts a block of server-side c# code.
<script language="JavaScript"> or just <script> starts a block of
client-side javascript code.


Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top