mvc

Castle Windsor: master controller not resolving the registered components in the container

Having the code below in my Global.asax.cs and two controller (one based on a the other: MasterController) I don't seem to find how can I resolve the repository register in my WindsorContainer from the MasterController... the same applies in the HomeController and works perfectly... what am I doing wrong? Global.asax.cs: private IWinds...

MVC View Bind with form post and display data in the same page.

Hi All, As I have started working on MVC application, I have one query for the same. I have one textbox (for employee name as I want to retrieve data basis on this) in the page , I want to post the form and get result of 'Employees' data in the same form. (I want to show grid type layout in the same form just below to the textbox) Cou...

Certain Pieces of a Web Page in MVC

I am rewriting a client's application from a crappy built as one huge blob of a project into a MVC application for obvious reasons. In doing a view for pieces of it I am noticing the original programmer has plenty of statements where they change up images or put in different links based on the logged in user. How does everybody that wr...

How do you replace a control's postback processing in ASP.NET MVC?

I’ve developed a Web User Control with ASP.NET Web Foms that uses client side binding and allows to the user to enter a series of items. During a post, the JavaScript code of my control serializes the items in JSON and put them in a hidden field so the server code of the control can take this JSON string, deserialize it and expose the en...

How do you replace control's postback processing in ASP.NET MVC?

I’ve developed a Web User Control with ASP.NET Web Foms that uses client side binding and allows to the user to enter a series of items. During a post, the JavaScript code of my control serializes the items in JSON and put them in a hidden field so the server code of the control can take this JSON string, deserialize it and expose the en...

Custm membership provider from MYSQL MemberShipr Provider,

hi, I am implementing my custom membership provider for MYSQL for this I write thi code: public class CustomSqlMembershipProvider :MySQLMembershipProvider { public override void Initialize(string name, NameValueCollection configs) { base.Initialize(name, configs); } } When I am compiling this class, ...

ASP.NET MVC - Html.BeginForm(). Can I post back to a different route and keep existing querystring values?

I have a post-only action that has a different route. In my form, I need to post to it, but also keep the querystring values I currently have. Initial response: /my/first/path/?val1=hello Needs to post to: /my/other/path/?val1=hello It seems when I specify a route, it of course only returns the route and doesn't append the querystrin...

LINQ Generating Bad Query, Error Unknown Column (VB.NET MySQL)

I'm developing in MVC2 using VB.NET and MySQL and ran into a problem trying to convert a simple SQL query to LINQ. SQL Query: SELECT Location_Number, sum(Column1) as totalC1, sum(Column2) as totalC2 FROM MyTable WHERE year = 2010 and month = 8 GROUP BY Location_Number ORDER BY Location_Number LINQ Query: From r In MyTable _ Where...

How to see all open nhibernate sessions in the application

Hi, is there a way to see all open nhibernate session in the application? Why? Because, Ia m getting this error in my MVC application: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. I have done th...

How do you keep MVC with multiple databases?

I have lots of databases to hit and put in one page. Most of the frameworks only allow me two native configure them for one database. They all assume the usage is for a new app and one database. I have lots of legacy databases. Since I can only configure one database in frameworks I have seen ci, zend, others, it looks like my additi...

sexy-combobox plugin not working inside of jquery dialog

I'm attempting to use this plugin, which turns a select list into a combo box where the user can type their selection in, in addition to the select list functionality. http://vladimir-k.blogspot.com/2009/02/sexy-combo-jquery-plugin.html The issue I'm having, is when the select list is inside of a jquery dialog, it no longer has the dro...

puremvc on winform ?

I cannot find any mvc framework that can cover both the web and the desktop, mobile (including iphone) except puremvc. It seems great for Winform http://www.pathf.com/blogs/2009/07/winforms-development-made-simple-with-puremvc/ But apart from samples for silverlight, I cannot find a real example for Winform just a 10 line snippet. I c...

How should I test an MVC web app in a container with nunit?

We have an MVC web which is running in Autofac. All the config is stored in an autofac config section in the web.config and when run the Global asax sets up the container and sorts out all the modules by providing them with their config settings - the one I'm interested in at the moment is the NHibernate module - so this gets the connec...

Excessive Null checking in MVC Views

This is a question about style and design rather than syntax. I have domain models that have several (for lack of a better term) navigation properties. So in my strongly typed details view of Foo which has a property of type Bar I could do the following: <%: Foo.Bar.Name %> However, sometimes Bar is Null, so I end up with something ...

From MVC to MVVC

I don't want to store my domain model classes in the same assembly as my web platform. The Models folder in the project structure is therefore useless to me. I've however just finished the Music Store Tutorial and noticed how they create a "ViewModels" folder which makes lots of sense to me. Does it make sense to just treat the Models...

redirect ajax requests

Hi i want redirect ALL ajax requests(with X-Requested-With:XMLHttpRequest in header) to action: ajax(string function, string args) . How can i do it? For example: browser send ajax query with paramerts function=getImage&args=4 to url http://localhost/post/123 but we redirect query to http://localhost/ajax. ...

problem with URL.Action

I have a project (MVC/Asp.net) with a video player page. In my index page I create a link towards the player page as href="<%=Url.Action("PlayVideo", "Search", new { videoid=result.ID }) %>" The player page PlayVideo.aspx residing in the "Search" folder. Once deployed, I click the link but I keep getting an error that the resource...

Windsor container components not available on first controller action

Hi there, I'm using a configuration within the global.asax.cs to register the components but it looks the container hasn't been initialized yet at the first http request (HomeController > Index action) and it gives me a "The ObjectContext instance has been disposed and can no longer be used for operations that require a connection." erro...

MVC (codeigniter) design question

users want to see some reports from stored data in the db for example: all sales in a time interval (user submits a just a time interval), all the sales in the selected city in a time interval (same with above but this time extra city select dropdown), top selling 20 shops (another report , no form submission and different db tables i...

Rendering issue using SelectList from manually defined SelectListItems in MVC 2

I am using ASP.NET MVC 2 (.NET 3.5), and need to manually define what shall be an Options list. When I do so I get a drop down menu, with each of the manual entries reading 'System.Web.Mvc.SelectListItem'. My view model defines the list as such: public SelectList YesNoList { get { List<SelectListItem> tmpLis...