.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> .NET Framework >> Post New Question Subscribe to Interview Questions

What is Action in C# 3.5?

Posted By :Jean Paul     Posted Date :November 26, 2010    Points :10   Category :.NET Framework 
Action is a built-in delegate which returns void.

There are 5 versions of Action

Action
Action<T>
Action<T1, T2>
Action<T1, T2, T3>
Action<T1, T2, T3, T4>


You can also find related Interview Question to What is Action in C# 3.5?  below: 

How do you create a Custom action for an item in a list ?

  

Ans. This can be done by adding a new feature into SharePoint. You would need to use customaction tag in your elements.xml file and will have to set various properties like imageurl or UrlAction for your customaction. You can later add this feature into sharepoint using stsadm install feature command. (More...)

How can I add the result of an ASP.NET MVC controller action to a Bundle?

  


I have a controller action that returns Javascript file. I can reference this file from my view and it works fine. I'd like to put it in a System.Web.Optimization.Bundle with the other JS files.

I'm trying to do this, essentially:

new Bundle().Include("~/DynamicScript/UrlDictionary");

The other files in my Bundle get rendered just fine, but this one is ignored. Seeing this behavior, my assumption is that bundling gets handled before the application is able to resolve URL's through the routing infrastructure, or maybe that the bundling component doesn't request files in a manner that would allow that resolution to happen.

If someone could confirm that for me and/or point me in a good direction here, it would be much appreciated.
(More...)

What is Custom action?

  
Represents a link, toolbar button, menu item, or any control that can be added to a toolbar or menu that appears in the sharepoint ribbon UI. For e.g. "New Link" button in your List is a custom action Items in List Tools is a custom action. (More...)

How do you create a Custom action for an item in a list ?

  
This can be done by adding a new feature into SharePoint. You would need to use customaction tag in your elements.xml file and will have to set various properties like imageurl or UrlAction for your customaction. You can later add this feature into sharepoint using stsadm install feature command. (More...)

Mention some of the return types of a controller action method ?

  
An action method is used to return an instance of any class which is derived from ActionResult class.
Some of the return types of a controller action method are:
i) ViewResult : It is used to return a webpage from an action method
ii) PartialViewResult : It is used to send a section of a view to be rendered inside another view.
iii) JavaScriptResult : It is used to return JavaScript code which will be executed in the user's browser.
iv) RedirectResult : Based on a URL, It is used to redirect to another controller and action method.
v) ContentResult : It is an HTTP content type may be of text/plain. It is used to return a custom content type as a result of the action method.
vi) JsonResult : It is used to return a message which is formatted as JSON.
vii) FileResult : It is used to send binary output as the response.
viii) EmptyResult : It returns nothing as the result.
(More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend