Reputation: 11403
Q:many times , i find my self need some features ,and when search and search i find all i need as jquery files , i donot know jquery , all i know that it is javascript library ,now i wanna to know if i have set of jquery files , after including those files in any asp.net application . how to use them ,i mean how to use their functions in the .cs(code behind) file..if there is an example to understand the main idea, it will be great.
thanks in advance
Upvotes: 1
Views: 3549
Reputation: 33867
The example you link to shows somebody using the ScriptManager class to output script to the client, where it runs.
This is a tool that ASP.net provides to simplify outputting dynamic <script>
tags - it does not run the javascript on the server at all.
Upvotes: 1
Reputation: 9113
JQuery is for HTML Manipulation (and animation, event handling and Ajax) on the client so you won't be able to use it in your code behind but only on the client !
Now using JQuery is simply adding a reference to it in your html like
<script src="path to jquery.js" type="text/jajascript"></script>
then the js file will be loaded on the client and you will be able to use the JQuery object often used with its alias $.
Follow this tutorial and you should be on track in 18 minutes
For your popup problem, you can find a lot of popup plugins here : http://plugins.jquery.com/
Upvotes: 5
Reputation: 489
Jquery can be a very useful extra functionality for your application, it will work clientside as you must have realized from your finding that it is a JavaScript library.
I often integrate it with .net applications and that works great. I generally just add it in the aspx-file, not in code-behind, but that should be possible too, if needed, by using the ScriptManager.RegisterClientScriptBlock-functionality.
JQuery is very well documented. Take a look at http://docs.jquery.com/Tutorials When you get the basics, you will soon get the point how and if you can use it for your features.
Upvotes: 1