Questions tagged as 'asp.net'

2
answers

Select with Linq set the first characters in the where

How can I set in Linq the same as I define in the Where do sql server clause of the form below .. select * from tb_CentrosCusto cc where cc.Clasificacao like '1.4.1%' In other words, I'm trying to find out what's going on with...
asked by 13.11.2015 / 15:14
1
answer

Validating form data in ASP.NET MVC

Is there any quicker and simpler way to validate a form's data in ASP.NET? so I do not have to be doing as many treatments as in the example below: [HttpPost] public ActionResult Attempt(string email, string password, Entities db) { ViewBa...
asked by 02.03.2016 / 22:30
1
answer

Query using LINQ and Generics C # [closed]

I'm having trouble running a LINQ query using Generics. Something like: from x in session.Query<T>() " ??? " My method receives two strings as parameters, columnName and search value. public virtual object PesquisePorColunaValor(...
asked by 22.09.2015 / 20:42
2
answers

manipulating DataTables.net data with Json [how to manipulate json to display img in column]

I'm putting together a table with the JS framework DataTables I process the data via Server-side through JSON In the first column I would like to display a photo, the name of this photo comes via JSON. How to do it? Example of...
asked by 19.10.2015 / 20:29
2
answers

Encoding ASP Classic

I have an application in .asp and I was having problems with special characters, they were printed on screen in a totally unconfigured way. To solve the problem, I applied: Response.CharSet = "ISO-8859-1" Response.CodePage = 28591...
asked by 14.08.2015 / 22:03
3
answers

Problem in breaking a String

I have a string that is concatenated inside a loop , I wanted a new line with the concatenated values to be created for each loop . Here is the code I'm using: mensagem =""; for (int i = 0; i < titulosReceber.Rows.Count; i++) men...
asked by 05.08.2015 / 15:19
1
answer

Error "Access-Control-Allow-Origin header is present on the requested resource" [duplicate]

I need to insert an API on my site that provides the weather forecast for a particular city, however, the ajax request always returns the error in the browser console. Follow below: XMLHttpRequest cannot load http://developers.agencia...
asked by 07.08.2015 / 23:03
2
answers

Insert time and time into the database [closed]

I want to insert the time and date separately into the database, which has the timestamp and data fields, respectively. I have the following code on the button that inserts: SqlCommand sqlInsertCabecalho = new SqlCommand("Ins...
asked by 22.04.2016 / 15:48
1
answer

Return JSON with ASP.NET/C#

I have the following codes Default.aspx <script type="text/javascript"> /* Relógio */ function startTime() { $.ajax({ type: 'POST', url: 'Default.aspx/GetNetworkTime',...
asked by 26.01.2015 / 18:42
1
answer

Publish ASP.Net site

I made my first test site in ASP.Net and when I'm going to publish it to my normal ftp (I'm using visual studio 2013) I open the domain link gets all these folders and such ... How do I publish it? What I have to do?     
asked by 22.07.2015 / 02:21