Questions tagged as 'c#'

1
answer

How to update listbox of another Form?

Follow the code below: Class: public class Louvor { public int Value { get; set; } public string Text { get; set; } } Form2: Form1 form = new Form1(); var data = new List<Louvor>(); var files = Directory.GetFiles($@...
asked by 30.11.2017 / 17:18
2
answers

Doubt in C # with html

I have an application that loads an image that is inside the project. When I pass the directory manually (eg src="~/Imagens/logoACESSO.png" ) it loads the image normally, but when I get the same path for a C # variable it does not load the...
asked by 30.11.2017 / 17:56
1
answer

PDF generated with iTextSharp adding image gets poor quality

I have an image file that I need to pass to PDF and for this I am using iTextSharp . I'm trying to do this in the following way: private static void Main(string[] args) { using (var stream = new FileStream("document.pdf", FileMode.Cr...
asked by 22.11.2017 / 00:47
1
answer

Preventing sending data when updating page F5 in ASP.NET

I have a problem, I have a grindview with products, every time I add a product in the stamp it adds, but if I click on F5 it adds the new data to the cart. public partial class carrinho : System.Web.UI.Page { ProjetoContext bd = null;...
asked by 21.11.2017 / 19:43
2
answers

Write and retrieve information in files

How do I write data to a file and then retrieve it? I have an enrollment system. Start a folder in Windows and within it I generate the registrations sequentially. I finish and go home and the next day, I will generate new set of registrati...
asked by 21.07.2015 / 13:53
1
answer

C # - How to Make a Simple Web Scraping

I want to read information from an HTML page of a online radio . I have tried to do the reading using HtmlAgilityPack, however without success because the page in question that I am working does not use ElementId, I imagine that it is not a pro...
asked by 07.11.2017 / 06:35
1
answer

Access control C #

I have 3 applications in ASP.NET MVC 5, when logging in application 1 it opens a page with links to the other 2 applications how do I create a single session for the user and prevent it from copying the url and passing it to a colleague for exam...
asked by 07.11.2017 / 13:42
0
answers

How to get User's location - City State

I would like to know how do I get the user's location so I can make my systems automatically select the city from the DropDownList City. Through a blog the author teaches how to do this development that I even tried to accomplish it, but I'm...
asked by 09.11.2017 / 04:30
1
answer

How to assign the value of a TempData ["Test"] or ViewBag.Id to an html input?

I would like to know how do I get the value of my tempData variable and put in an html input, in value maybe ... could anyone help me? Code below: <div class="container-fluid"> <form method="post" style="margin: 0 auto; padding...
asked by 16.11.2017 / 00:03
1
answer

How do I mount a List or Ienumerable array on the Controller and step to View?

Good Night! I made a request to my webapi to fetch data in order to use it in a DropDownlist @Html.DropDownList("Id","Descricao") . In My controller, I can pull results from WebApi in collection, I have dealt with Json and I put it in my p...
asked by 15.11.2017 / 22:38