Tagged Questions
0
votes
2answers
17 views
WPF desktop application with multiple views
I have a WPF application running on Windows 8. It is the one-window application that has three different views in the whole client area of the main window: live video from a webcam, help screen, and ...
2
votes
2answers
54 views
get model from List of a model [on hold]
Is there a way to get the specific items from the list of a model without using a foreach of the list? like if you return a List<model> holding a model with a few differnt items to specifically ...
1
vote
1answer
37 views
passing a Guid from a view back to corresponding controller action
<div class="col1">
@foreach (var item in Model.ListApplications.Select((model) => new { model }))
{
<div class="col1">
<fieldset>
<p><span ...
2
votes
1answer
58 views
ASP.NET MVC Automatic Model Instantiation if Model is not provided
I'm trying to achieve auto instantiation of view models when they are not given (when they are null).
Controller Action
public ActionResult SomeAction()
{
return View("~/.../SomeView.cshtml"); ...
0
votes
2answers
70 views
C# - Populating Gridview
I want to create a grid view with one column containing empty textboxes where the user can input a number (quantity), some regular columns and a column dedicated to images.
I have the following code ...
0
votes
1answer
357 views
The name 'model' does not exist in the current context ASP.NET MVC 4 Razor
I'm trying to render the data collection for my project.
The sources:
http://ideone.com/8LbZuH ( View )
http://ideone.com/zaqHeE ( Controller )
http://ideone.com/P4iEkO ( Model )
The data binding ...
0
votes
1answer
41 views
C# MVC the proper way to construct the View with checkbox options and auto bind answer to object?
I want to make a webpage to store the user's favorite fruit(s).
here are my models:
public class user
{
public long UserId {get; set;}
public string UserName {get;set;}
}
public class ...
0
votes
1answer
69 views
C#, CF Listview, Create a View that Just Have ListViewItem text
I am using a Listview in Compact Framework to make a Menu. Listview has 4 views that i can use. LargeIcon,SmallIcon,List,Detail. All of these have the icon image above or next to the Listview item ...
2
votes
1answer
249 views
MVC 3 with ajax submit complex object to controller
I am using just mvc 3 with c# and ajax javascript and I have a view with a strongly typed model bound to it.
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" ...
0
votes
2answers
33 views
MVC Post method not taking any information from get method??
I have an extremely confusing case. I currently have the following code
//get method
public ActionResult EmailValidation(string email, string token)
{
EmailValidationViewModel model = ...
0
votes
2answers
46 views
Can't pass select values to controller
I'm having a difficult time passing my Select values on my View to the controller.
I have two items on my view which I wish to return to the model, where I can call in the controller. Heres what I ...
2
votes
2answers
37 views
Create an instance of a class sent by parameter / Delegates
I am trying to optimize my code a bit by either using delegates or using a class instance as parameter. I am pretty new to C# and I am not yet sure which one is the better approach assuming im on the ...
1
vote
2answers
74 views
'CREATE VIEW' must be the first statement in a query batch
This is my script in C#:
exec sp_executesql N'
IF OBJECT_ID(N''RealEstate.vwContract'', N''V'') IS NOT NULL
DROP VIEW RealEstate.vwContract
CREATE VIEW RealEstate.vwContract
AS
SELECT ...
0
votes
1answer
71 views
Change the view's path on the fly
I have this class:
public abstract class MyController : Controller
{
protected override void OnActionExecuting(ActionExecutingContext filterContext)
{
string viewPath = filterContext/*... ...
0
votes
0answers
33 views
Add so only some companies can view .Mobile version of site
I have created a MVC 4 project with the .Mobile extension on my Views. This is a beta release to specific customers.
Is it possible to make the mobile pages visible if the company has a specific id? ...