2018-10-20         Rachel

How to create drop down list in mvc

This is my controller[AllowAnonymous] public ActionResult Register() { ViewBag.Name = new SelectList(context.Roles.ToList(), "Name", "Name"); return View(); }This is my Create view part <div class="form-group"> @Html.Label("Select Your User Type", new { @class = "col-md-2 control-label" }) <div class="col-md-10"> @*@Html.DropDownList("Name")*@ @Html.DropDownList("Name",(SelectList)ViewBag.Name ) </div> </div>i can load the form with drop down. but when I am try t...

 model-view-controller                     1 answers                     81 view
 2018-10-20         Andy

Advise needed - which Rapid Application Development Framework using PHP and MVC meets this specific need?

we are a parents initiative who runs a small kindergarden / child nursery and we set out to build a basic web based documentation and reporting application for our nursery.After spending a week doing research on the various PHP MVC frameworks, I have a few questions that I could not answer myself - even after having a closer look (installed on local machine) at CakePHP, Symfony, CodeIgniter, YII and Joomla.The goal is to build a web application where site managers, staff and parents (roles) can log in to do simple tasks, depending on their role (hence I need a RBAC). Site m...

 model-view-controller                     1 answers                     45 view
 2018-10-20         Honey

How to change the default MVC T4 Template location?

I know the templates are in : [Visual Studio Install Directory]\Common7\IDE\ItemTemplates[CSharp | VisualBasic]\Web\MVC\CodeTemplates\And I know I can just simply copy the CodeTemplates folder into the root of the project to override the plates.I would like to know if it is possible to simply change the default template directoryeg change it to: [shared drive]\Visual Studio templates\CodeTemplates This might be what you're looking for http://blogs.msdn.com/b/webdevtools/archive/2009/01/29/t4-templates-a-quick-start-guide-for-asp-net-mvc-developers.aspx [XXX]

 model-view-controller                     1 answers                     30 view
 2018-10-20         Freda

MvcScaffolding a new project and add it to the solution (Large Scale Generation)

If I want to Large Scale Generation and define Application = Framework (binary core components) + Generated Code + Custom CodeHow would I go about creating code generation framework using scaffolding to generate multiple projects and associated files from some metadata (let's say a DSL model defined in a solution folder)I know that I can use MvcScaffolding powershell cmdlets to add files to the current on another project. I need to know if I can add a new project (Class library, Web appication) to the current solution from some kind of project template, apply source transfo...

 model-view-controller                     1 answers                     42 view
 2018-10-21         Gabriel

how to show a response in Razor view

my index view displays the IEnumberable inside an html table. with the links like edit and delete. delete links is create like below. @* @Html.ActionLink("Delete", "Delete", new { id= SomeId })*@Inside the controlelr action methods i am calling a service that gives me delete functionality. CustomResponseObject resp = someService.DeleteSomething(id);Now this CustomResponseObject has a bool indicating success or failure. and a string mentioned which business rule was negated if any. I want to propagate this message to the Razor in order to show an alert box.what will be a...

 model-view-controller                     1 answers                     11 view
 2018-10-21         Jane

Cannot detect which Submit Button is pressed

I have two input type submit on my view.<input type="submit" name="submitbutton1" value="Save">2.<input type="submit" name="submitbutton2" value="Process">My view is Manage.vbhtml and in that view i have a form with the above two submit buttons.My controller is StaffController and 'Function Manage(item as staff,submitbutton1 as string,submitbutton2 as string) as ActionResult' is associated with the above view. When i click any of the two submit buttons i should be getting the value of that button in the string parameter, but it's giving me nothing. Please help m...

 model-view-controller                     1 answers                     12 view
 2018-10-21         Grover

jqGrid resize event and the event triggered when page is refreshed

I have a jqGrid in my page and I want to know when does the resize event occur. Will it occur when I refresh the page? If not, what event occurs when the page containing the grid is refreshed. I would like to capture the event to alter it's width when the page is refreshed. A page refresh causes a postback, so jQuery/jqGrid events aren't really going to detect a refresh so much as the page loading.Depending on your goals, I would suggest either the jQuery .ready() method or the jqGrid gridComplete() method to handle grid resizing any time someone opens or refreshes the p...

 model-view-controller                     1 answers                     14 view
 2018-10-21         Beck

Can I make DropDownListFor width the same like TextBoxFor width with Bootstrap class?

I have NewCustomer View: <table class="table"> <tr> <td class="text-right"> @Html.LabelFor(model => model.Customer.GenderId) </td> <td> @Html.DropDownListFor(model => model.Customer.GenderId,new SelectList(Model.Genders,"Id", "GenderType"),"-=Select Title=-") </td> </tr> <tr> <td class="text-right"> @Html.LabelFor(model => model.Customer.Name)...

 model-view-controller                     1 answers                     56 view
 2018-10-21         Eileen

How can SignalR Cors be configured for an ASPNETCore 2.1 application?

I am trying to configure CORS for my aspnetcore 2.1 application. I have followed the documentation closely. My Startup file has been configured as follows. public void ConfigureServices(IServiceCollection services) { services.AddCors(options => options .AddPolicy("CorsPolicy", builder => { builder.WithOrigins("http://sitetracker") .AllowAnyHeader(); })); services.AddMvc(); services.AddSignalR(o => o.EnableDetailedErrors = true); services.AddDbContext<BiometricCon...

 model-view-controller                     1 answers                     46 view
 2018-10-21         Leila

"Connecting" nonGUI objects to GUI objects

I have a set of nonGUI objects which have a one to one realtionship with GUI objects. All events are routed through the top level window.Many ( not all ) events occuring on the GUI object result in calling a method on the associated object. Some methods in the NonGui objects which when called change the GUI objects. One example would be some sort of game like Rogue with a modern GUI.You have the area a player occupies in one turn ( call it a region )and you have the object ( a button ) associated with it on the GUI.Keep in mind it's only an analogy ( and not even the real p...

 model-view-controller                     2 answers                     84 view
 2018-10-21         Ronald

How to render the Mvc Mobile View in a iPhone?

I got to a stage that my Mvc mobile view (iPhone) is rendering in a web browser. Eg.Home Mobile iPhone Index.aspxMy question is how can I get this View into an iPhone type simulator? I don't know hot to get the mobile view to a nice looking simulator. Any ideas appreciated. Found the solution. I can use this to show the web mobile content. Doesn't work in most browsers but work in this device.http://labs.blackbaud.com/NetCommunity/article?artid=662 [XXX]

 model-view-controller                     1 answers                     28 view
 2018-10-21         Lucien

Dropzone.js Don't Show Result After Upload

Im trying to upload multiple files by dropzone.js in my MVC Project. The files upload successfully but the problem: after upload files, the page reset and i cant see the results. I have almost searched all the related subjects in this site and the other examples. I see people want to learn how they can refresh page :) but i want to stop page after upload. The results preview disappear quickly. Thanks for any help. After hours, i see its not about dropzone, its about mvc. Because of post data in mvc, if you save a file, modelstate change, then automatically redirect th...

 model-view-controller                     1 answers                     79 view
 2018-10-21         Joshua

DotNetNuke MVC routing conflict

I have a number of DotNetNuke MVC modules that are configured like the following:RouterConfig namespace IMT.LH.AssociationAdmin { using System; using DotNetNuke.Web.Mvc.Routing; public class RouteConfig : IMvcRouteMapper { public void RegisterRoutes(IMapRoute mapRouteManager) { mapRouteManager.MapRoute( moduleFolderName: "LH.AssociationAdmin", routeName: "LH.AssociationAdmin", url: "{controller}/{action}", namespaces: new[] {"IMT.LH.AssociationAdmin.Controllers"}); ...

 model-view-controller                     1 answers                     50 view
 2018-10-21         Veronica

Route Chaining with the Zend Framework

I'm trying to implement route chaining for an admin panel on a Zend Framework site that I am working on. I'm using the following configuration file in hopes that the "admin" route routes with "/admin" and that the "adminLogin" route routes with "/admin/login".<?xml version="1.0" encoding="UTF-8"?><routes> <admin> <route>admin</route> <defaults> <module>admin</module> <controller>index</controller> <action>index</action> </defaults> &...

 model-view-controller                     3 answers                     61 view
 2018-10-21         Hazel

How to enforce URI segments to Kohana pagination after the page URI segment?

I'm using Kohana's pagination library and it lets you specify the parameter uri_segment at initialization.When it generates the pages links, they will have that uri_segment you specified, and after that, the page link. Let's say: /some/uri/segments/6 where 6 is the page.Now, that enforces the page number to be the last uri segment. What if your URI schema needs to have more segments after the page, which is my case, as I'm making a search controller that can have a variable amount of optional search parameters, but as the page number is not optionalm it has to be at the beg...

 model-view-controller                     1 answers                     92 view
 2018-10-21         Leo

Saving current view controller in swift

I want to save the current view controller when I navigate to a new view controller so that if I navigate back to the previous view controller, the information is still present. What I'm doing right now is using segues to navigate between view controllers, using the prepare for segue function. However, this method creates a new view controller. I was thinking about using self.navigationcontroller.popviewcontroller, but will this restore the information from the previous view controller? If you want to go back, having the same instance of viewcontroller - Yes.popviewcontr...

 model-view-controller                     1 answers                     65 view

Page 1 of 18  |  Show More Pages:  Top Prev Next Last