Most voted "asp.net" questions
ASP.NET is a web application framework developed by Microsoft to allow programmers to build dynamic websites and web applications. Use the tag for traditional web forms, the classic template that provides the illusion of "stateful" pages. Do not use this tag for the style using the standard Model-View-Controller; use [Asp.net-mvc].
Learn more…1,881 questions
Sort by count of
-
1
votes0
answers44
viewsHow to publish an ASP.NET (.NET Framework) project without the iis dependency
I have a project working but with the dependency of IIS. In some researches I found the possibility of making the project self host. As in the link: http://www.macoratti.net/18/05/net_conc3.htm But…
-
1
votes1
answer35
viewsWebapi Project - . NET
I am developing an Asp.Net Webapi application (first REST application). So far everything is ok, even because I’m in the testing phase using Postman. I believe I must complete this first stage…
-
1
votes0
answers7
viewsHow to place a Raddiobutton as Checked on the Razor Page
I have the following question, I want to leave this radiobutton as checked, but it is not checked, I tried to put checked(true), but it does not work, follow the code: @Html.Radiobuttonfor(m =>…
-
1
votes1
answer457
viewsAsp.net and C# problem image gallery to display the photo
I’m having trouble displaying the photo in the browser the Repeater brings all the database information except the photo. I entered the data manually in the database. //TABLE CREATE TABLE…
-
1
votes1
answer191
viewsLoad a Gridview with selected records
How to load a Gridview into the webform with a few lines already selected ? I’m trying the following code but without success... protected void BindGridAcesso(int idSenha) { Usuario usuario =…
-
1
votes1
answer58
viewsHow to work with more than one dropdownlist to mount a C#URL?
I have the following dropdownlist where in the first person chooses whether to rent or sell immovable. The consultation in the bank is being done as follows: public List<Imovel>…
-
1
votes0
answers316
viewsDrop-in-frame menu over another frame
Hello, how do I make my menu that is inside a frame go over another frame? I have the following html: <frameset rows="150,*" frameborder="no" border="0" framespacing="0"> <frame name="menu"…
-
1
votes2
answers4316
viewsProblem to run IIS Express on my network
Hello I’m trying to run the IIS do Visual Studio 2015 ASP.NET Empty Web website to work on my network so I changed this file ...\Documents Visual Studio 2015 Projects meuProjeto . vs config…
-
1
votes0
answers23
viewsReturn inside the control does not send to the right maproute
Good afternoon, I’m trying to use maproute to control editing and inserting data in the table, currently my routeConfig is like this: public static void RegisterRoutes(RouteCollection routes) {…
-
1
votes0
answers339
viewsEvent Button click, added dynamically, does not work
I’m working on a page that loads a list of items into a GridView. The content is being loaded normally, but the need to add a cell with a text and two buttons. With the code below is adding the…
-
1
votes1
answer557
viewsIs it possible to use Webbrowser on the web Forms Asp.net c#?
I’m looking to use Webbrowser on Asp.net C# My question and log into a website using it using System; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Web;…
-
1
votes1
answer190
viewsProblem saving Dropdownlist information to the database
I’m having trouble saving information in the dropdown by btn-save I have a property registration form and the information entered in the dropdown occurs only that at the time I save on another page…
-
1
votes1
answer884
views"The best compatible overloaded method has some invalid arguments"
I’m creating a service with a method that has an argument like List<OrdemPais>(), and passing an object of this type to the method, but when compiling it appears the error: O melhor método…
-
1
votes0
answers203
viewsSelected Checkbox list only contains those on the screen
I have a GridView containing a list of items with a checkbox and make use of the code below to "paginate" the table: $(".gvdatatable").dataTable(); The problem occurs when I check which ones…
-
1
votes0
answers136
viewsSave multiple photos in SQL Database in same ID
I’m having trouble saving multiple photos in a single id this is the Cs of the page that makes the register protected void btnSalvarImovel_Click(object sender, EventArgs e) { try { var cmd = new…
-
1
votes1
answer830
viewsPOST is not receiving JSON
I need some help with running a POST. 'Cause when I try to call my API (http://www.afectus.com.br/api/teste) for the execution of a Post, I am unable to pass the JSON to her. Follows the API used:…
-
1
votes2
answers110
viewsProblem with regular expression in Asp.net with Angularjs(1)
On this site, I got this regex: @"^\(?\d{2}\)?[\s-]?[\s9]?\d{4}-?\d{4}$" Then I tried to adapt to my reality, my rule which is: Only accept digit(number) in the input. I’m not there those things…
-
1
votes0
answers72
viewsDuplicate image error on save!
My function that saves the images in the folder works properly, but when I open the photos folder the images appear duplicated however with different names Follow the save function: protected void…
-
1
votes1
answer194
viewsReturn Json - Angularjs
I am creating an Asp.Net Web.API application and the return of service is in Json. So far so good, it happens that the main object (Companies) is returning an internal object - citiesFiliais…
-
1
votes1
answer1071
viewsInjection of Depension with Ninject C#
I am developing an application that has 4 layers Dominio, Infra, Servico e Web When I have access to a route for example Home/Index he says that there is no constructor without parameters, my…
c# asp.net-mvc asp.net dependency-injection ninjectasked 7 years, 11 months ago William Cézar 1,268 -
1
votes1
answer566
viewsListing the return of a Viewbag for View?
Following the instructions of this post (Return the data to the View using Json.net or javascript-Asp.net mvc) answered by Loudenvier was like this: Class: public class TB_RECEBE_IMAGENS { public…
-
1
votes2
answers49
viewsPrevent Seed from duplicating data
I’m using this code in Seed to generate values in my table, so I don’t have to type in the database, when I change something of my code and need to give an update in the database, so it’s not…
-
1
votes1
answer737
viewsAlign textbox in the center of a page using Asp.net bootstrap
I can’t centralize the email and password textbox. Follow part of the code and image to help. <body> <form id="form1" runat="server"> <!--Começo cabeçalho--> <header> <nav…
-
1
votes1
answer212
viewsProblem with route routing Asp.net mvc
I have the following route, where I get the representative’s id: http://localhost:18568/Representative/Index/1 So it’s working, but I’d like to show the representative’s name…
-
1
votes1
answer125
viewsHow to send a special character to the view , Asp.net mvc?
I have a situation where I would like to position the page in the same position as the container I was in before sending the Get? Example : <!-- ==== contato ==== --> <div class="container"…
-
1
votes1
answer65
viewsChanging customer information via ID
I cannot change customer information through ID Code that makes the changes in the Database public void Atualizar(Contato contato)//metodo para atualizar dados: update { OleDbParameter[] parametros…
c# database asp.net ms-access type-conversionasked 7 years, 10 months ago André Felipe Jardim Firmo 127 -
1
votes1
answer150
viewsAjaxpro not accessible on IIS
I have a simple application with Webforms, I created some methods that I will access via Ajax via Ajaxpro DLL. I used the attribute [AjaxPro.AjaxNamespace("Teste")] in class and the…
-
1
votes1
answer324
viewsHow to change the color of the Repeater line at runtime
How do I change the line color Repeater running ? Repeater lines are loaded through what comes from the database. Example: If there are 3 lines, when displaying in Peater, the first line is of one…
-
1
votes3
answers878
viewsHow to hide URL ID?
17/11/2016 I have an application that is mounting the following URL www.meusite.com.br/controller/action/id However, I need the ID not displayed in the URL, but let it live on back-end, because it’s…
-
1
votes2
answers196
viewsParameter arriving truncated way in Ajax request
I have a requisition Ajax that gets the data I need from a WebMethod. The problem is that the parameter used for the request is "coming" truncated in the WebMethod the length of the parameter is 44…
-
1
votes1
answer178
viewsException when adding usercontrol more than once
Hello. I have a user control newsletter and it is added in various places within the project, for each page on which it is called, a property is set to insert the email into a particular group of…
-
1
votes2
answers45
viewspassing a complex object to MVC4 controller
I’m using MVC4 C#, I have a table that is generated dynamically according to the user’s decision, in this format: generated by js <tr class="itemPedido"> ' + '<td class="col-sm-1">' +…
-
1
votes0
answers208
viewsASP.NET MVC + Checkbox how to proceed?
I have a list where I register FOOTBALL TEAMS in CHAMPIONSHIPS, I mean, I need to select several teams for a championship, I make a list with checkbox but do not know how to proceed later:…
-
1
votes1
answer426
viewsJquery Maskmoney Asp.net Mvc
I use the Jquery MaskMoney in my inputs to treat the decimais, so far so good, but I noticed that when I type values above 1,000.00 where the MaskMoney plays me the point(.) in value, When I save…
-
1
votes3
answers2917
viewsHow to call javascript function in Asp.net?
This is my job <script> function keypressed(obj, e) { var tecla = (window.event) ? e.keyCode : e.which; var texto = document.getElementById("numeros").value var indexvir = texto.indexOf(",")…
-
1
votes1
answer162
viewsHow to direct each user to their page corresponding to their access profile using Asp.net Identity with roles
I have 3 profile registered in the SQL Server database, they are Master, Admin and User , when log in as you would for each user to be directed to your permission view. by default the route ta…
asp.net authentication asp.net-identity access-controlasked 7 years, 9 months ago Marlon Andrade 11 -
1
votes0
answers107
viewsProblem with Oauth2 JWT in Webapi2
Basically all code is working, I can generate my token, I can do everything, but I’m not able to validate the token. My code is like this when I call the api. What happens is: I’m sending the…
-
1
votes1
answer91
viewsFocus() net Asp method
I have a page with several controls, when I trigger an event from a button I want the focus to go to a textbox that is below the page, but this is not happening simply by putting the method focus()…
-
1
votes1
answer83
viewsASP.NET MVC with Angularjs and Layoutpage
I am developing an application using the best of both worlds of Asp.net MVC and Angularjs. I do the database requests with Webapi which works very well. But now I have added an angular module in the…
-
1
votes3
answers115
viewsPage rendering Asp.net Disabledcssclass
I have the following problem, I have this code on a page: <div class="modal-footer"> <asp:Button runat="server" ID="btnCancelar" Text="Cancelar" class="btn btn-sm btn-danger"…
-
1
votes1
answer106
viewsHow to make Web Publish from nested applications to IIS?
I am developing a project consisting of a portal and an administration interface. In Visual Studio I have two ASP.NET projects, where one is the Portal and the other is the administration interface.…
-
1
votes1
answer416
viewsHow to insert arrays inside angular objects?
Let’s say I have a vehicle object that has the following attributes converting my class c# to Json: { "UsuarioId": 0, "TipoId": 0, "MarcaId": 0, "ModeloId": 0, "VersaoId": 0, "Quilometragem": 0,…
-
1
votes2
answers127
viewsWhich event runs first, javascript or Asp.net?
I have a javascript method on a button, which is triggered with the click of it, but this same button triggers an Asp.net event. The js event executes a method that processes a value and this value…
-
1
votes1
answer68
viewsHow to execute a JS function before the so-called Codebehind method?
I have an Asp button <asp:button ID="cmdAvancarEndereco" runat="server" cssclass="btn btn-success btn-lg" text="Avançar >"> </asp:button> that has an event of the VB trailer in the…
-
1
votes2
answers300
viewsReturn Javascript before finishing processing
I have this method: var getCardToken = function () { var passa = true; var code = false; var acardNumber= $("#ContentPlaceHolder1_txtNmCartao").val(); var acvv=…
-
1
votes1
answer65
viewsHow to send selected items from a Grid by email
I have a grid and in it I have a product listings from several different suppliers and each supplier has its ID. I would like to select the grid items and send the email to each vendor with their…
-
1
votes3
answers726
viewsClick a <tr> to open a link
On the site I am doing has the need that when it is clicked on a table row it redirects to another page, but the line id’s are dynamic, because each line should redirect to a page that shows more…
-
1
votes1
answer171
viewsHow to keep option after refresh - Asp.net
I have a select, some options and a jquery code that in select change, updates the screen with the data of the chosen option. The question is, how do I maintain the option after window.Location?…
-
1
votes1
answer545
viewsASP.NET - Access Dropdownlist item attribute in Code Behind
I have a DropDownList in which I add items as below: var item= new ListItem("Texto do Item", "Valor do Item"); item.Attributes.Add("NomeAtributo", "ValorAtributo"); The DropDownList is rendered on…
-
1
votes1
answer260
viewsDefaultview.Rowfilter filter by date filter
Good afternoon, I am filled a Gridview, but when I am going to perform the filter, it informs me the following error "Object reference not set for an instance of an object." The field I’m trying to…