tl;dr: How does one implement MVC in JavaScript in a clean way?
I'm trying to implement MVC in JavaScript. I have googled and reorganized with my code countless times but have not found a suitable solution. (The code just doesn't "feel right".)
Here's how I'm going about it right now. It's incredibly complicated and is a pain to work w...
I am attempting to implement a custom locale service in an MVC 2 webpage. I have an interface IResourceDictionary that provides a couple of methods for accessing resources by culture. This is because I want to avoid the static classes of .Net resources.
The problem is accessing the chosen IResourceDictionary from the views. I have conte...
I'm new to MVC although I've read a lot of papers and information on the web. I know it's somewhat ambiguous and there are many different interpretations of MVC patterns.. but the differences seem somewhat minimal
My main question is - are M, V, and C always going to be necessary to be doing this right? I haven't seen anyone address t...
Is it possible in Asp.NET MVC to proframmatically logout a user? I am aware that you can use:
FormsService.SignOut();
But this refers to the context of the webpage making the request. I'm trying to prevent a user logging in twice. So if I call:
MembershipUser membershipUser = Membership.GetUser(userName);
if (membershipUser.IsOnlin...
We have a strange issue with running an Facebook IFrame application (using MVC 2). When I run my app and log into Facebook, I get to the application just fine. But when my coworker does it, she gets the following error:
API Error Code: 100
API Error Description: Invalid parameter
Error Message: Requires valid next URL.
Typically thi...
I am pretty new at this stuff, so bear with me.
I am using ASP.NET MVC.
I have created an overlay to cover the page when someone clicks a button corresponding to a certain database entry. Because of this, ALL of my code for this functionality is in a .js file contained within my project.
What I need to do is pull the info correspondin...
I'm currently working on my own PHP Framework, and I need some help figuring out if I'm going in the right direction or not...
The framework is both for my own use and to generally advance my PHP skills further. I've encountered numerous problems that by overcoming them I have learned a great deal, and love being able to create somethin...
I have a list of constants (I'm using them as an enum), some are define statements, and some are just global variables.
Where am I suppose to put them in the MVC framework so I can use them for both my model and my controller that needs to reference it?
I'd rather not stick it into config/constants.php since they shouldn't be called ex...
Hello, I ran into a situation that I have never ran into before, hoping someone can help.
I have a client that wants to be able to run a totally new ad-hoc report, or pick one from a drop down list. When chosen, it does a foreach through filter criteria objects nested in the report object.
I had some initial trouble, because there was...
Hello,
This is a situation I have found myself in a few times and I just want clear it up once and for all.
Best just to show you what I need to do in some example code.
My Controller
function my_controller()
{
$id = $this->uri->segment(3);
$this->db->from('cue_sheets');
$this->db->where('id', $id);
$data['get_cue_sheets'] = $this-...
I almost have this solved but need a little push.
Here's what I have:
In the database I have a field called active that is a bit field (True/False)
I have placed a dropdownlist on the View form like this:
<%= Html.DropDownList("lstActive", new SelectList((IEnumerable)ViewData["ActiveList"])) %>
In my controller, I simply have this ...
Hi,
I'm using Telerik grid to present memos received by user below is the code
<%Html.Telerik().Grid<UserManagement.Models.SentMemos>()
.Name("ReceivedMemos")
.Sortable(sorting => sorting
.OrderBy(sortOrder => sortOrder.Add(o => o.MemoDate).Descending()))
.DataBinding(dataBinding => dataBinding
...
Hi All,
i am having one masterpage containing some div tags and i have inherited it in to MVS view page, i need to change css class of div from controller class of my viewpage.
could you please let me know how can i achive this?
thanks
rahul
...
I made a custom view engine for my application.
~/Themes/Default/Views..
And I have an Area called Admin.
Area/Admin/Views..
I register my custom view engine in Global.asax :
RegisterViewEngines(ViewEngines.Engines);
AreaRegistration.RegisterAllAreas();
RegisterRoutes(RouteTable.Routes);
When I browsed my admin site, it cant fin...
Hi there,
When I put the following code on my page.
<script type="text/javascript" src="../../Scripts/jquery-1.4.1.js" />
Then anything below will became nothing, can anyone tell me why?
Thanks alot.
Sorry, I am very new in web development.
Thanks
...
For the login page of my website I would like to list the latest news for my site and also display a few fields to let the user log in. So I figured I should make a login view model - I call this LoginVM.
LoginVM contains a Login model for the login fields and a List<NewsItem> for the news listing.
This is the Login model:
public clas...
I am writing a design document and people on my team are willing to do the move from ASP.NET WebForm to ASP.NET MVC. This is great, but I have a hard time to understand how MVC workswith in a 3-tier (Data Layer, Business Layer and Presentation Layer) architecture. Can we say that the Model, View and Controller are part of the Presentati...
I'm trying desperately to move from VSS to a real source control system. Options include TFS and SVN.
My designers need to keep their ability to modify source files and instantly preview their changes in a browser without having to commit their changes. Using FPSE with VSS, this works flawlessly, since saving a file causes the copy in ...
Hi,
I have problem with implementing Rich Text Editor (all that i tried, e.g. TinyMCE). I tried many tutorials and articles but all same. When i am trying do it the best what i get is working editor in IE (8) but other browser not (Opera, FF, Chrome). Samples that i download work fine in all browsers.
I am using VS2010 ASP.NET MVC2 and e...
Would using MVC to write a serious game be good design and a smart move, or is there another Design Pattern that makes more sense when dealing with this kind of software. And has anyone done a non-casual game using MVC? What was your experience?
I'm designing a game engine in objective-c w/Cocoa and it won't use any of the Cocoa UI co...