action

Data not saving in MVC2 Edit_Post controller action

My View inherits a strongly-typed object. My Edit (Get) controller action returns a View, passing to it the model object. When my Edit (Post) controller action accepts a FormCollection object, calling UpdateModel and db.Save() works fine. If I change the Edit (Post) controller action to accept the strongly-typed object instead of the ...

Calling the Session before any Controller Action is run in MVC

Hi, I have this authentication check in my global.asax file in the Session_OnStart() call: if (Session["Authenticated"] == null) { Response.Redirect("~/Login.aspx"); } This kind of session authentication is tightly coupled in all our web apps so I have to use it this way. This global.asax sits in an older ...

ASP.NET MVC: What are Action Method? Action Result? How are they related?

Hello, I'm sorry to ask such a basic question, but it's kind of fundamental for me. To better understand filters, I need to understand this notions. Although I'm on ASP.NET MVC for few months now and now are doing nice demos, I'm more familiar with Action method concept than action result. What are: Action Method? Action Result? How...

How to create a new Thread to execute an Action<T>

The title pretty much says it. I have some methods that need to run on a new thread and since all the code before creating the thread is pretty much the same, I thought I would create a function that could take as a parameter the Action I need to invoke. Problem is, I have not found how to tell the thread that it needs to execute the Ac...

WPF: Dynamic Actions in Template

Hi, I've defined a control Template for a progressbar to make it look like a thermometer ... now i want it to change its color when reaching a certain value (for example .. when the progressbar has the value 70, its color should change to yellow) Currently the color of PART_Indicator is bound to the background color of the progressbar ...

Call an action in a controller and continue with the view from the same point with the same info

Hello, What I am looking to do is have my site.master call a specific controller action, and then continue to process the current request without any view or information change. I want to do this in the site.master because I want this action to run on every page that is loaded, and since all pages use my site.master (as I have not creat...

How to recognize redirect and submit in struts action

Hi. My website use struts and tiles. I use this link to link to register form: <a href='<s:url action="register" namespace="/vtv" />' >Register</a> here is the register.jsp: <s:form namespace="/vtv" action="register"> <s:textfield label="Username" name="username" /> <s:textfield label="Password" name="password" /> </...

How to find references to the file system in a flash application?

Hello everybody, I need to disable all the aspects of functionality which access the client file system in a flash/flex application. I started having a look on how to do this. It appears that the package flash.filesystem need to be importated to allow the interaction with the file system. However, I did not find any reference to this p...

Can't use Flash ExternalInterface in Action Script 3.0 on localhost

I have a flash file which captures an image from a webcam and sends it to the server. This file works fine under ActionScript 2.0 but under 3.0 I get an Unspecified Error and the debugger crashes on the return eval in : function __flash__addCallback(instance, name) { instance[name] = function () { return eval(instance.CallFuncti...

add generic Action<T> delegates to a list

Is it possible to add a generic delegate Action to a List collection? I need some kind of simple messaging system for a Silverlight application. UPDATE The following is what i realy "want" class SomeClass<T> { public T Data { get; set; } // and more .... } class App { List<Action<SomeClass<T>>> _actions = new List<Action<S...

Visual Studio: How to override the default "Build Action" for certain extension types per project or solution?

I'm serving my asp.net mvc views from many assemblies and copying views to the main application on post-build event. This works, however, I realized, that when I change something in view and just hit F5, changes are not included. What I have to do to see changes is to: save, build<- explicitly clicking, and then hit F5. However, it's pr...

Creating a Delphi app shortcut with no corresponding menu item

I want to have a shortcut key combination (like Ctrl+Alt+D) in my app to invoke a function, but I don't want the shortcut to appear on any menu. Is it possible to have a shortcut available in your app that is otherwise invisible? ...

Rails: Multi-submit buttons in one Form

Say I have an Article model, and in the article 'new' view I have two buttons, "Publish" and "Save Draft". My question is how can I know which button is clicked in the controller. I already have a solution but I think there must be a better way. What I currently used in the view is: <div class="actions"> <%= f.submit "Publish" %> ...

How to check for the FLV file existence before playing that using FLVPlayback in Action Script 3?

Hi, I'm very new to the Action Scripting, I'm using the FLVPlayback class to play my FLV files. If I'm trying to play a FLV file which is not existed yet then I am getting a "VideoError: 1000" with message of Unable to make connection to server or to find FLV on server. I want to check for the FLV file existence using the file URL or...

AS3 Loading a Class using getDefinition()

Hello Everyone, I have hit a road block on this and would highly appreciate if someone can help me on this, please. What I am trying to do is to use shared runtime library by loading a swf ('index.swf') which has numerous library objects which are named in sequence such as: (orange1,orange2,orange3,orange4) (red1,red2,red3,red4) I am ...

actions vs. avm instructions in actionscript

My questıon is that, what are actions and what are avm instructions. I've been reading these two documents: http://www.adobe.com/devnet/swf/pdf/swf_file_format_spec_v10.pdf http://www.adobe.com/devnet/actionscript/articles/avm2overview.pdf but I couldn't get the concept of it. Could anyone with more understanding of it explain this pl...

C# - Is it possible to get the owner type of a method from an Action?

I have a class that implements an Interface with some methods. I also have method with an Action parameter where I pass the Interface method. Is it possible to get the type of the owner that has the method? EDIT This is the wrapper: private void Wrapper (params Action[] actions) { var action = actions.FirstOrDefault(); var type...

ActionController::MethodNotAllowed (Only get and post requests are allowed.):

Not sure what's going on. I've used the following bit of code to try and edit the name of a category, but I'm getting the error message above. My code for the form and submit for the edit is: - <% form_for :category, :url => categories_url(@category),:html => { :method => :put } do |f| -%> <p>Name: <br /><%= f.text_field :name, :size =>...

how to put hidden action in table?

i have two button inside my form, i set them inside table: <table id="status"> <tr> <td> <p align="center"><button id="accept">Accept</button></p> </td> <td> <td> <p align="center"><button id="reject">Reject</button></p> ...

pass url stored as string in variable to form's onsubmit

how can i make a form tag using onsubmit (that executes upon hitting enter) which opens a target window with a given url in a string variable form? what i have so far: <div id="row2"> <!-- Intranet Search --> <form action="" onSubmit="urlGen(this);" method="get" target="_blank"> <input type="text" id="intranet" size="15" value="Sea...