Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C# scripting not working
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 3.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MySQL
Application:
Web
Miscellaneous
Thread ID:
01426452
Message ID:
01426467
Views:
39
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform