I'm trying to create an XML sitemap using CakePHP, from a table which has more than 50,000 records at the moment, each record equivalent to a URI in the sitemap. Now the problem I'm facing is CakePHP is running me out of memory while generating it, for two reasons:
A find('all') is building a huge associative array of the entire set of...
Is MVC achievable in RCP? If so, what frameworks are out there to achieve MVC in an Eclipse RCP app?
...
I'm not having any luck finding where in my code I should run migrations when I start up my application. Obviously this should only happen once, when the app starts.
In Global.asax.cs I tried:
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RegisterRoutes(RouteTable.Routes);
var repository = new...
From what I understand MVC has more SEO friendly urls. Or at least it is easier to achieve.
Is the reason for this that you can make fake folders that are actually arguments like:
question/37/WhatIsSEO
Where the equivilent Webforms would be question.aspx?id=37&title=WhatIsSEO
Where the title doesn't actually do anything, it is just ...
Currently I'm working on an iPhone app that asks the user for login information, verifies this information and presents the user with a table view of their information.
On launch the application delegate launches an empty table view along with the modal view to ask for login credentials. The login credentials consist of a standard us...
I am trying to set the selected values for a MultiSelectList but the page does not display any values as selected. I have tried every practical way to do this and still get the same results. I am currently trying to pass a list of selected objects in via the constructor. What gets me is that when i inspect MultiSelectList object, the se...
Hello everyone,
I am having a problem accessing the ViewData object through javascript.
I have set the ViewData object on the controller and on document.ready event of the view i am trying to see the contents of that same ViewData object like so:
var test = <%= ViewData["NAME"].ToString() %>;
alert(test);
I don't get an a...
Why hello SOers. My question today is about authentication endpoints and the architecture surrounding them.
Most web frameworks and applications I've encountered seem to have a single URL or endpoint to deal with 'authentication' - e.g. processing authentication tokens such as usernames and passwords, and doing something with them.
It ...
Well, this must be easy, but ...
I have a dropdown list in my view:
<%= Html.DropDownList("ddlDistricts",
Model.clients.DistrictList,"-- select district --",
new { @class = "ddltext", style="width: 200px", onchange = "this.form.submit();" }) %>
Model.clients.DistrictList is of type SelectList.
What I want to do is make sure the ...
When I have a controller, e.g. article I often have a action_view() that handles most of the code.
Sometimes, it can become 80-100 lines long.
My controller usually handles all of these:
binding template variables
setting sessions (where appropriate)
sending emails
validating forms
I could see bit and pieces that I could make anoth...
I am using ASP.NET MVC for developing a web site. I am using jquery for AJAX functionality. In the action methods, I want to return some error to signal that the input is not correct or that the action could not be performed. In such error cases, I expect the jquery ajax error handler to be called and I can take appropriate action in the...
I am a web and mobile application developer and I prefer to use MVC frameworks for development. I have just started to a desktop application (in C#). Application development is not a problem. I had written various desktop application before but they were for personal use or for small companies.
Is there a good open source project that I...
Hello,
I'm building WPF client application. I'm following MVC pattern.
The project solution has many items, so I created „Views“ and „Controllers“ separate assemblies. „Views“ assembly references „Controllers“.
Problem: I need to load ShowModalDialog user control from withing controller instance which has no reference to View d...
I am using Ajax within MVC to render some partial views and have come across a weird problem. Once I click a tab which submits ajax.beginform to render the tab as a partial view, the following happens:
from the ajaxOptions, the OnBegin function is called.
after this it is supposed to go to the function inside the controller which is s...
Hi
Just a quick question about best practice in MVC development.
Let's say that I've got two controllers (cont1, cont2), each of which uses a separate model, model1 & model2.
all files are complex, models contain dozens of methods.
Say, I finished developing of the first controller and I'm in the middle of work on the second one. I n...
I converted my project from MVC 1 to MVC 2 and Visual Studio 2008 gives me the following error:
Error 1 'System.Web.Mvc.MvcHtmlString' does not contain a definition for 'Substring' and no extension method 'Substring' accepting a first argument of type 'System.Web.Mvc.MvcHtmlString' could be found (are you missing a using directive o...
Hi
Today I ran into a problem where I cannot call the ControllerContext in my Controller, within the MS Unit Test method when accessing via a private method. For example
//This is my controller and private GetUsers() method
public class SampleController : Controller
{
private IEnumerable<Users> GetUsers()
{
...
I'm using ELMAH to handle the exceptions in my ASP.Net MVC project. I would like to use it to log errors like database connection timeout, query connection timeout and others. Is this possible with ELMAH?
...
I'm attempting to fire off a JQuery .get() to a MVC (2 rc 2) controller. I can see the JS function call happen, then when the .get() is called it never comes back.
(1) It would be great to know what I'm doing wrong to fix the immediate problem
(2) It would also be great to have an education on what to do for debugging these async reque...
Hello,
What is wrong with this code. The code is finding the javascript and debug1 shown. If I remove the parameter p the code also founds mycontrol action and debug2 is shown.
View:
function method(p) {
alert("debug1");
$.post('../MyController/MyAction/' + p, function() {
alert("debug2");
$('#panel').empty().h...