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...
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...
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...
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...
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...
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, ...
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...
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...
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...
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...
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...
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...
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...
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 ...
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...
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.
...
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...
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...
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...
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...