Questions tagged as 'asp.net'

1
answer

ASP.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 the screen with the attribute...
asked by 06.04.2017 / 20:43
1
answer

How to execute a JS function before the CodeBehind method call? [duplicate]

I have a button asp <asp:button ID="cmdAvancarEndereco" runat="server" cssclass="btn btn-success btn-lg" text="Avançar >"> </asp:button> which has an event of VB linked in click Private Sub cmdAvancarE...
asked by 10.02.2017 / 15:13
1
answer

What is the difference between the HttpRequestContext and HttpRequest? And how to convert the HttpRequestContext to HttpRequest?

What is the difference between the HttpRequestContext and HttpRequest? And how to convert the HttpRequestContext to HttpRequest?     
asked by 27.01.2017 / 15:30
1
answer

How do Web Publish of nested applications for IIS?

I'm developing a project that consists of a portal and an administration interface. In Visual Studio I have two ASP.NET projects, where one is Portal and the other is the administration interface. In my local IIS I have an application call...
asked by 20.01.2017 / 12:56
1
answer

Get DropDown value when Textbox receives focus

What can I do to get the value that is selected in a DropDownList and pass to a TextBox only when Textbox gets the focus (when the user clicks the field)? I've already put a Autopostaback into DropDownList t...
asked by 28.12.2016 / 12:54
3
answers

How 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(",") var index...
asked by 04.12.2016 / 04:57
1
answer

Changing customer information via ID

I can not change the customer information through the Code that makes changes to the database public void Atualizar(Contato contato)//metodo para atualizar dados: update { OleDbParameter[] parametros = {...
asked by 15.11.2016 / 18:09
1
answer

Focus () method asp net

I have a page with several controls, when I trigger an event of a button I want the focus to go to a textBox that is down there, but this is not happening simply by putting the method focus() on textBox . Does any other control lik...
asked by 31.12.2016 / 23:54
2
answers

passing a complex object to MVC4 controller

I'm using MVC4 C #, I have a table that is dynamically generated according to the user's decision, in this format:  generated by js <tr class="itemPedido"> ' + '<td class="col-sm-1">' + '<p class="codigo">' + $(thi...
asked by 25.11.2016 / 16:55
1
answer

Injection of Dependency with Ninject C #

I am developing an application that has 4 layers Dominio, Infra, Servico e Web When I have access a route for example Home/Index it says that there is no constructor without parameters, my constructor looks like this: public Home...
asked by 21.10.2016 / 13:31