I'm using ASP.NET MVC (1.0) and StructureMap (2.5.3), I'm doing a plugin feature where dll's with controller are to be picked up in a folder. I register the controllers with SM (I am able to pick it up afterwards, so I know it's in there)
foreach (string file in path)
{
var assy = System.Reflection.Assembly.LoadFile(file);
Scan(...
I need to create something similar to how MVC invokes an Method(Action) and also uses the Model Binder to map a NamedValueCollection to the parameters on that method. Basically I have a Controller action that needs to dynamically call a method on a class, the controller has any information sent in a form or query string plus the name of ...
Suppose I have a form in view with dynamic row with fields bound to viewmodel like:
<%for (int i = 1; i <= 5; i++)
{ %>
<tr>
<td style="width: 100%">
<%= Html.TextBox("Link", Model.Websites[i.ToString()].Links)%>
</td>
.....
</tr>
<%} %>
When the form is posted, in FormCollection, all data coming from Te...
I am building a version of the MVC Storefront. I have two themes, one is the standard ui, and the other is the admin ui. I have some HTML Helper methods, which deliver .ascx files to the .aspx files just like the example, but without plug-ins. All the stuff works on the default theme, but none of it works in the admin theme. I always ge...
Can I use the Copy Web Site tool in Visual Studio 2008 to deploy MVC application to my hosting server? However, the Web Site menu doesn't even show up in Visual Studio with MVC project opened. What's the best practice to deploy MVC application? Thanks.
...
I would like to submit a form using jQuery and submit it to a controller action for processing, to include all the model properties, is this possible?
...
There is a checkbox created by html helper in MVC view:
<%= Html.CheckBox("Choice", false)%>
Then Want to get the checking status of this this checkbox in js using jquery, how to write the code?
...
I have an ASP.NET MVC application that is calendar-like. As per the NerdDinner example, I'm updating the results of my edit page using UpdateMethod()
In my app, certain events are fully customizable and certain ones are only partially customizable. Even though the edit form for editing the partially customizable events only have those f...
ASP.NET MVC 1 doesn't support asynchronous threads spawned inside of a controller (yet, there is stuff in the Futures assembly and MVC 2 Preview, but nothing in production level release). However, I want to send my email asynchronously and I'm currently exploring options to do so.
Once seemingly easy option, instead of actually sending ...
Can a asp.net mvc view page have a webform control on it?
I think I read about it before, but I'm not sure how it would work since MVC doesn't use viewstate etc?
...
I have an asp.net MVC app that also has a silverlight project for some sprinkled in effects and functionality... I just added a new file to my silverlight project and am at a loss in how to migrate it over to the clientbin in the MVC application
...
Hi
I want to have some viewData info across all my views so I am following this tutorial
http://www.asp.net/LEARN/mvc/tutorial-13-cs.aspx
So I made my own applicationController but I need to get the UserName from the user.
Yet when I do this "HttpContext.User.Identity.Name" in the constructor it is always null. I am not sure why thou...
Hi,
My helper looks like:
public static string OutputBlah( this HtmlHelper helper )
{
return htmlWriter.InnerWriter.ToString();
}
then in my viewpage:
<%= MyHelpers.OutputBlah() %>
Should this be working or am I missing something?
Error says that there is no overload that accepts 0 arguements.
What should I be passing into my m...
I am making my own base controller since I want to pass some data to a master page. Now since this is like adding this code to every view in that controller it gets run every time.
By the time it loads up the first time I think it has hit my code at least twice. So I was thinking about caching it. But in my book it says don't cache priv...
This is a weird one for me. I have a simple domain with 2 entities Company and Carrier. They have a m:m relation via another table.
I set up my Fluent mappings as so
public partial class Carrier {
public virtual int ID { get; set; }
public virtual string Name { get; set; }
public virtual IList<Company> Companie...
Why is the checkbox not checked with this code?
<td><%=Html.CheckBox("ItemIsActive", item.ItemIsActive)%></td>
Item.ItemIsActive is of type boolean and set to true?
When i do this, it shows "true" in the view
<td><%=item.ItemIsActive%></td>
...
Hi guys
Just wondering if anyone knows whether its possible to gzip results before putting the data in the cache...Note I am wanting to use a CompressAttribute I have and the built-in OutputCacheAttribute. I'm pretty sure its possible, because I have heard Jeff A. talking about it on a couple of podcasts...
I know I can sort of change...
I have an action method setup:
public ActionResult Delete(IList<Product> products)
And a table of products in my view. I have got Model Binding working so that on submit I can populate the products list. But I would like to populate it with only the products that are selected via a checkbox.
I think I could do it by changing the acti...
I have an MVC app that is working fine, but I now want to add in an SSL site to the app.
This is a separate site in IIS, with the SSL certificate, but for re-use, I'm just pointing the SSL site to the same directory as the regular site.
What I'd like to do now, is direct the user to a certain controller (payment) if they come in on the...
I am looking for a sample code/implementation of open id as in stackoverflow.
I need to implement open id in my MVC C# application to allow my users to login with their google, yahoo, AOL,.. accounts.
Please suggest me a good reference.
...