Where to go to learn about C# Asp.net with MVC & WebServices
I'm strugling to find any decent resources with regards consuming a webservice in an MVC/C# Asp.net App. Any suggestions? ...
I'm strugling to find any decent resources with regards consuming a webservice in an MVC/C# Asp.net App. Any suggestions? ...
The following code does not compile <ul> <% foreach( var row in SomeDataTable.Rows) { %> <li> <%= Html.ActionLink( row["field1"].ToString(), "action", new { } ) %> </li> <% }v %> </ul> the error is - cannot apply indexing with [] to an expression of type 'object' var is supposed to be implicit type ? What gives ? NOTE - I k...
I have a ASP.NET MVC application using NHibernate and the application runs fine when running it through VS2008 virtual web server, but when I tried running the site through my local IIS server I keep getting this NHibernate error: No session bound to the current context. I don't know what happened. Am I missing something? I just have my ...
I see there is version 1.5 and 3.0 beta, but I can't seem to find a version 2. Is this just wacky MS versioning? Are you using 3.0? Would you recommend it, or should I stick with 1.5? ...
I'm having a tricky issue (bear with me as I'm new to MVC) with trying to use a controller (and a route subsequently) with the name PropertiesController. I believe this is because there is a directory (which I can't really remove) called "Properties" in my solution. Is there a way round this? The route setup is just one simple route: ...
Will you put the model part in asp.net mvc into a different library/assembly? Edit Or should we put put the model part in asp.net mvc into a different library/assembly? ...
Hi, I have to monitor some data during the day (basically a log stored in a Oracle table), and it has to be as close to real-time as possible. So what I need is: A good way to get incremental data from the table (replication packets?); and A good way to display it on both a web page and a C# GUI monitor. Explaining the existence of ...
I am trying to set up so that my default page http://demo.liginsurance.com/ goes to http://demo.liginsurance.com/default.asp currently it goes to http://demo.liginsurance.com/Home/Index what route can i write or ignore to get that to work... -Thanks Hurricane ...
Hi, Using linqtosql, how would I get a colleciton of User objects, if I have an array of UserID's that I want to fetch? ...
With linq, do you create a single dbContext per request like nHibernate requires (for performance reasons, creating sessions in nhibernate from what I understand are an expensive call). i.e. in my asp.net-mvc application, I may for a given action, hit the database 5-10 times on seperate calls. Do I need to create a context and re-use ...
I am relatively new to ASP.NET MVC, and am very impressed with the clarity of the platform so far. However, there is one aspect that I find uncomfortable. At first, I accepted the fact that when I say return View(); I am calling a helper method that returns an ActionResult, and makes some assumptions about which view to present, ro...
I have to write kind of a complicated query to get some statistics for the rules in our system for each Agency we have in our database. It looks something like this: There will be an arbitrary number of columns (rules) and rows (agencies) for this data. For example, here there are 5 main rule columns shown, but this could just as eas...
My goal is to have the url routing as following: http://www.abc.com/this-is-peter-page http://www.abc.com/this-is-john-page What is the simplest way to achieve this without placing controller name an function name in the url above? If page above not found, I should redirect to 404 page. Addon 1: this-is-peter-page and this-is-john-p...
Hi, I am trying to send an exception caught in Controller to trace.axd page, but I cant seem to figure it out. I have <trace enabled="true" localOnly="false" mostRecent="true" pageOutput="false" /> in web.config, and my inteded reaction to an exception is catch (Exception e) { ViewData["error"] += "Is not number!"; Trace.Trac...
I have 2 radio button with values New & Existing. If user chooses New, then I show a textbox on the form and if Existing a dropdown and textbox is hidden. The question is , does the hide/show of the textbox/dropdownlist have to be written in the View or the Controller class? Also when I choose the selection my whole form is posting back ...
I'm using ASP.NET MVC Validation. I want to know in my javascript functions whether the validation has error. Is there any builtin javascript property integrated with ASP.NET MVC Framework to get this information? ...
What is the best-practise way of Identifying dynamically generated element on page? Let me explain. I have a list of elements, there can be as few or as many elements as the user defines, on a page. Each one of these corresponds to an item each with it's own id. Now, the user has the ability to edit or delete these elements on the page...
I am getting the following Error The model item passed into the dictionary is of type 'MvcWebApplication.Models.Product' but this dictionary requires a model item of type 'MvcWebApplication.ViewModels.ProductCommonViewModel'. Controller Code is as follows:- public ActionResult Index([Bind(Prefix= "MvcWebApplication.ViewModels.ProductC...
Uff...long title. As it states, when the asp.net redirects to the login page, it adds the ?RequestUrl=/pathToSome/Action to the url. When this happens I get that YSOD :"The view '/PathToSome/Action' or its master could not be found. The following locations were searched:" Any thoughts on why? Thanks Bruno ...
I know you can restrict which HTTP methods a particular ActionResult method responds to by adding an AcceptVerbsAttribute, e.g. [AcceptVerbs(HttpVerbs.Get)] public ActionResult Index() { ... } But I was wondering: which HTTP methods an ActionResult method will accept without an explicit [AcceptVerbs(...)] attribute? I would presu...