Questions tagged as 'mvc'

1
answer

Is this class correct?

I'm new to PHP, an instructor did this Controller class, it's an MVC, and he put __Hospital(){} without using it, is that necessary? class Hospital{ private $cod; private $nom; private $dir; public function __Hospital()...
asked by 11.04.2018 / 20:30
2
answers

how to pass data from a controller to a view that is not yours?

For example I have the DeleteUsers driver whose view is DeleteUsers.cshtml and another where the driver is Users and the view is Users.cshtml what I want is to pass the value of ViewBag.Error in DeleteUsers (controller) to Users (Vista) for ther...
asked by 18.08.2016 / 19:16
2
answers

How to handle PHP file paths

Hello guys for a long time I wanted to introduce myself in the PHP world but I had never finished giving the pleasure, one of the issues I have is how to manage the routes of the include and require already if you have several folders to include...
asked by 29.07.2017 / 21:55
2
answers

Go to another controller from javascript

I want to redirect from a view to a controller that is a higher level, for that I use @url.action in this way miUrl = '@Url.Action("CambiarEstadoVisita", "~/Areas/Visitas/Visita")'; But the link it generates is this: http://localho...
asked by 24.08.2016 / 10:23
2
answers

C # MVC How to use currency format

I need to use the currency format When using the annotation: (Model) [DataType(DataType.Currency)] [DisplayFormat(DataFormatString = "{0:C2}", ApplyFormatInEditMode = true)] public Nullable<float> monto { get; set; } (View)...
asked by 15.01.2018 / 18:01
2
answers

Login using the active directory in ASP.NET

Good morning. I have an application, web with a database connection, I have always used the classic authentication of SQLServer in the string connection: <connectionStrings> <add name="CapaDatos.Properties.Settings.Logis...
asked by 14.03.2017 / 23:31
2
answers

MVC Call model from another entity

I'm working with CodeIgniter and as you know PHP is quite free and lets us do many things, sometimes bad practices. The question is more theoretical than the Framework. In an MVC architecture, is it bad practice to call the model of another e...
asked by 11.04.2018 / 22:14
1
answer

C # How to convert string to System.IO.StreamWriter?

Hi, I have the following problem, I want to write my csv but I put the accents wrong with strange characters. Then I want to add UTF8 but when I put it on, more Encoding.UTF8 already tells me that    Unable to convert string to System.IO.Stre...
asked by 10.08.2018 / 17:39
1
answer

Create variables in Razor and then manipulate them in Jquery?

Is it possible to do something like this? @{var list = [1,2,3,4,5]; } I do not boot error but then when I want to use that variable in Jquery, it does not appear. What is the correct way to do it?     
asked by 14.12.2017 / 22:35
1
answer

error PHP-LARAVEL Undefined variable:

I'm doing a project in laravel. But he throws me the next mistake. In my controller I have this: public function edit($id) { $lanifComercial = new PlanifComercial(); $lanifComercial->LABORATORIO = 'LABORATORIO'; return view('P...
asked by 31.07.2017 / 22:48