Questions tagged as 'asp.net'

2
answers

String was not recognized as a valid DateTime

protected void ButtonPesquisar_Click(object sender, EventArgs e) { var _macro = new LFSistemas.VLI.ACTWeb.Entities.Macro(); var macroController = new MacroController(); var itens = macroController.ObterTodos(new Entities.FiltroMacro(...
asked by 22.09.2014 / 20:31
1
answer

How do I view the version of my site on all pages?

I want to display in the footer of all my pages the version where my site is running. For example: Version 1.0 After I do an update on my site and post it again it would be something like Version 2.0 What is the best, or best, way to do...
asked by 09.01.2015 / 15:18
2
answers

Relative path to txt in ASP

Good afternoon, I am generating a file with Asp net the function saved in HD if I put the path, however this file will be saved on a server and I am having difficulty to place the relative path of the location where this file will be saved, I do...
asked by 23.10.2018 / 20:09
1
answer

Read a value inside a complex JSON in C #

Good morning everyone! I am new to C # and am having a hard time getting a value inside a complex Json. Json is this: { "id": "58e50b82-50b1-4f29-a2e8-a9a544013255", "timestamp": "2018-06-20T18:00:12.935Z", "lang": "pt-br", "result":...
asked by 25.06.2018 / 14:45
2
answers

GridView ASP.NET c # data from the same table

I have the following table in SQL with the following fields (id, name, day, week, active). id the primary key of the integer type; name nvchar day week nvchar; active bit; and I have the following data in the table 1; Joseph; Monday 1; 2; Joseph...
asked by 21.03.2014 / 19:50
1
answer

Perform a redirect on Builder

How can I make a Response.Redirect() in a class constructor? public class FarmaciaController : Controller{ public FarmaciaController(){ if(!userLogin.usuarioTemPermissao("Farmacia")) Response.Redirect("~/PortalFarm...
asked by 09.06.2015 / 18:38
1
answer

The name 'Component' does not exist in the current context

I'm trying to create a view component to reuse on pages, I'm trying to follow some video tutorials. I have already installed via nuget the entire Microsoft.AspNetCore.Mvc, but when I try to call it from the viewpage, using @Component.InvokeAsy...
asked by 06.06.2018 / 16:57
2
answers

How to do Search and sort of TemplateFields in a GridView?

Basically, I have a table (GridView) on an aspx page whose data is defined by TemplateFields. For example: <asp:GridView runat="server" ID="grdProdutos"> <Columns> <asp:TemplateField HeaderText="Produto">...
asked by 02.04.2014 / 19:30
2
answers

How to pass a parameter from one Action to another Action on the same Controller

I need to send a parameter of an action to another action on the same controller, but the parameter is "zeroed". How can I do this? Below the code I'm doing: [Authorize] public class ItemMaloteController : Controller { public IActionResult...
asked by 19.11.2018 / 04:59
1
answer

Modeling - Model

I'm having trouble creating my models. Let's imagine that I have 4 different types of products (Here like A, B, C and D) public class Produto { public int ProdutoId { get; set; } public TipoProduto TipoProduto { get; set; } //enum t...
asked by 24.08.2017 / 21:16