mvc

How to display a flyout menu on clicking an image in Grid header in MVC?

A grid is displayed using the following code in MVC. <%= this.Grid( "routes-" + mc , "Testing", Model.Routes, new GridBuilder<RouteModel>() .Column( "chk", () => Html.Image( Url.Content( "down.gif" ), "Select or deselect tests" ), (m) => "<input type='hidden' name='routeLinkId' value='"+ m.RouteLinkID +"' /...

How to submit a table with dynamic rows of data via asp.net mvc or jquery?

hi guys, i'm totally noob to asp.net mvc and currently i'm writing an web app which allows user to select multiple product from a listbox and add them to a dynamic table with rows that can be added or removed. thus i'm thinking of using jquery to add and remove the table row, thus the table row will be added via append("xxx"). but the...

How to return wchar_t from a function

i want to return wchar_t frm a function. How can i implement it wchar_t wcstring1[newsize1] How to return "wcstring1" from a function and make it to save into another variable of same type(In another function) ...

Visual Studio 2008 Web Project error: Unable to start program http://localhost:port

I am re-hashing this question because I have looked at over 50 threads in different forums and have not been able to get a resolution to my problem. Here are the specs: Windows XP SP3, Visual Studio 2008 SP1, .NET 3.5, ASP. NET MVC 2 project, IE 7 (was IE 8) Up until a few days ago I was not having any issues. It is now happening on an...

How to integrate KVC in MVC?

So I have an MVC-application in Cocoa. There are some custom views, a controller and a model. Of course, the views need to know some stuff, so they get their data from the controller. However, they do not use accessors in the controller, they use KVC with a keypath that calls right through to the model: // In view.m time = [timeSource v...

ASP.Net MVC Database Driven Menu Strange HTML output

I have a database driven menu Helper that gets called from within my master page: <div class="topBar"> <%= Html.MenuTree(39, false, "first", "last") %> <div class="clear"></div> </div> Below is the code that outputs my HTML unordered list. The problem is that sometimes the output of the menu is completely wron...

Is there a better loop I could write to reduce database queries?

Below is some code I've written that is effective, but makes too many database queries. Is there a way I could optimize and reduce the number of queries but have conditional statements still be as effective as below? I pasted the code repeated a few times just for good measure. echo "<h3>Pool Packages</h3>"; echo "<ul>"; for...

MVC Pages that require the user to be logged in

I'm working on a little MVC framework and I'm wondering what the "best way" is to structure things so secure pages/controllers always ensure the user is logged in (and thus automatically redirects to a login page--or elsewhere--if not). Obviously, there are a lot of ways to do it, but I'm wondering what solution(s) are the most common o...

ASP.Net MVC - how can I easily serialize query results to a database?

I've been working on a little property search engine while I learn ASP.Net MVC. I've gotten the results from various property database tables and sorted them into a master generic property response. The search form is passed via Model Binding and works great. Now, I'd like to add pagination. I'm returning the chunk of properties for ...

ASP.NET MVC Yes/No Radio Buttons with Strongly Bound Model MVC

Hello Does anyone know how to bind a Yes/No radio button to a boolean property of a Strongly Typed Model in ASP.NET MVC. Model public class MyClass { public bool Blah { get; set; } } View <%@ Page Title="blah" Inherits="MyClass"%> <dd> <%= Html.RadioButton("blah", Model.blah) %> Yes <%= Html.RadioButton("...

need advice on Zend framework Application architecture, or say approach dealing with modules

Let me start with the things that I did and how am I using some things to get results I have set up modular structure as: application/ /configs /layouts /models /modules /users /profile /frontend /backend /controllers /views .......

Best possible PHP error class

I am looking for some coding ideas on the following task I am trying to achive. I have a list of Error Numbers, Description, and User Friendly Description in a document. Ex: Error Number, Description, User Friendly Description ----------------------------------------------------- 1, Internal Error, "An Internal Error has occurred. Ple...

No database connection when trying to use IIS locally with asp.net MVC 1.0

Login failed for user ''. The user is not associated with a trusted SQL Server connection. When I try to use IIS locally instead of Cassini I get this error. The ASP.NET MVC 1.0 site is running on WinXP. The database is local and has SQL Server and Windows Authentification mode enabled. The website runs OK using Cassini, with the sam...

ASP.Net MVC - What replaces events to support loose coupling?

What feature(s) of ASP.Net MVC can replace the way events can be used in Webforms to support loosely coupled components? For example, take a simple pager control in Webforms: A page number is clicked Pager fires off a "PageChange" event with the new page number This subscribing page/control received the event and handles initiating a ...

formcollection not see me all inputs

Hi, I have a View where some input text to be added dynamica using jquery, I mean everything funzona, and when I go to add these inputs and do right button on the browser I'm not seeing the added input. function addPerson () ( current + +; StrToAdd var = '<table id="compo" name="compo"' + current +'> <tr> <td> <label for="firstname...

ASP.NET MVC solution to a forms application?

Hello, We're building a survey system and utilising ASP.NET MVC and wondered if anyone can offer suggestions on the architecture. Here's the problem we're trying to solve. Essentially an agency sends out several surveys every year. They're very structured and not like SurveyMonkey style of surveys - they're actually applications of fee...

mvc post techniques

My form is as follows, how can I retrieve the values in my controller: <% using (Html.BeginForm("Create","Employee")) {%> <%= Html.ValidationSummary()%> <p><label for = "Name" >Name</label> <%= Html.TextBoxFor(model => model.EmployeeName)%> <%= Html.ValidationMessageFor(model => model.EmployeeName)%> </p> <label f...

How to send and retrieve in the controller

I have the folowing code in my view, however, I can see that I don`t have the values in the controller. What is wrong? In the view I have, <% using (Html.BeginForm()) {%> <%=Html.TextBox("Addresses[0].Line1") %> <%=Html.TextBox("Addresses[0].Line2")%> <%=Html.TextBox("Addresses[1].Line1")%> <%=Html....

How to set value to text are in MVC

I have a text area <%=Html.TextArea("CDescr", "", new { Class = "textarea1" })%> I want to set value to this textare from controller. How can I do that ? ...

How to structure an enterprise MVC app, and where does Business Logic go?

I am an MVC newbie. As far as I can tell: Controller: deals with routing requests View: deals with presentation of data Model: looks a whole lot like a Data Access layer Where does the Business Logic go? Take a large enterprise application with: Several different sources of data (WCF, WebServices and ADO) tied together in a dat...