Questions tagged as 'c#'

3
answers

How to anchor a redirect in APS.NET MVC

How can I send the user to a certain page block by passing the id in the url. For example: link , how to pass this type in ASP.NET MVC using return RedirectToAction . The line of my code looks like this: return RedirectToAction("Ind...
asked by 21.06.2017 / 22:09
1
answer

Tutorial of usability with transparency c #

I'm working with C # and need to do a usability tutorial, just like in games that darken the screen, highlight a component and display a hint right below. So far I made a Form on top of the other, because I could not make a layer without it i...
asked by 21.06.2017 / 20:48
1
answer

Clear Panel from a UserControl

I'm developing an application where multiple UserControls will be shown in a Panel from the code below: UserControl1 u1 = new UserControl1(); panel1.Controls.Add(u1); And I remove them from this code: panel1.Controls.Clear();...
asked by 22.06.2017 / 18:17
1
answer

Error inserting data with EntrityFramework C #

I have a very strange problem, I have 3 tables, being them, Countries, States and Cities, all of them are certainly configured the same, but it is giving error only when you enter data in the Cities table.    Classes: public class Paises :...
asked by 23.06.2017 / 01:16
1
answer

Migrating from WebForms to MVC, what is the best way to store and manipulate the data of a logged-in user?

For years I have worked with C # systems in WebForms , but by necessity I have migrated my development goal to mobile applications with Xamarin and MVVM . Now in parallel I'm developing web systems again, but in MVC standards. But one a d...
asked by 19.06.2017 / 22:21
1
answer

Can not be assigned because it is read-only after doing a "Join"

Controller: [HttpPost] public ActionResult Listar_Json() { var id = 5; var search = Request["search[value]"]; //Aqui pega valor digitado no input, digamos que ele digitou 100.000,01 var query = database.Posts.Join(database.Post_Metas,...
asked by 02.07.2017 / 20:51
1
answer

Change MenuItem Popup Template WPF

I'm trying to modify the style of my MenuItems and their SubMenuItems but the popup where the SubMenuItems are is in a default style. To be clearer: Popup is a default Windows component of WPF ...     
asked by 04.07.2017 / 02:32
1
answer

Receiving face in View

Hello! I'm trying to get a filter parameter in my view with the following code in Controller : public ActionResult Cadastro(int? idParente) { var tab_Documentos_Parente = db.Tab_Documentos_Parente.Where(campo => campo.Id_P...
asked by 17.08.2017 / 16:41
1
answer

File close

I need to leave the file free, without being in use because it is barring. Here is the code: StringWriter sw = new StringWriter(); XmlTextWriter tw = new XmlTextWriter(sw); XmlSerializerNamespaces xsn = new XmlSerializerNamespaces(); xsn.Add(...
asked by 18.08.2017 / 14:09
1
answer

Linq Return all records when ID is NULL

Inquiry: retorno = tarefaRep.GetAll(c => c.status == 0 && c.id_empresa == idEmpresa && c.id_cliente.ToString().Equals(idCliente)...
asked by 16.08.2017 / 22:29