Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C# scripting not working
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 3.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MySQL
Application:
Web
Divers
Thread ID:
01426452
Message ID:
01426467
Vues:
40
>I am trying to using script=C# in my html page.. but it doesnot work.. what I missed?

I see a few different issues:

This line:

using mynamespace;

doesn't belong inside of a method.

The other (bigger) problem is that you can't treat C# code the same as JavaScript code. While JS code runs on the client, C# code will run on the server. The syntax you're using is just a way of embedding the code that normally goes in the code-behind page into the ASPX page. It doesn't make it run on the client and isn't a substitute for JS code. So your onclick="return Submit1_onclick()" won't work the way you expect it to (ignoring the fact that Submit1_onclick() doesn't match the actual event handler of Submit_onclick).
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform