Questions tagged as 'c#'

2
answers

DropDownList calls the page load

I have a dropdownlist that takes data from the sql server database. I load this dropdownlist into the page_load within a if(!IsPostBack){} and from what I noticed from !IsPostBack , it only goes in there if it is the first t...
asked by 22.10.2015 / 23:15
1
answer

Control with HtmlControl or HtmlGenericControl within GridView

I have an html tag inside a gridview: <asp:GridView ID="GridView1" runat="server" ...etc..etc <i class="fa fa-cloud-upload fa-lg cinza" runat="server" id="icon_Nuvem"></i> ... When the gridview is being populated I have...
asked by 06.10.2015 / 15:07
1
answer

From the View how to get Model in Partial View

In View main, Index.cshtml , I load a partial view where it has a model . How do I make the Index call this model so I can serialize and send it to an action controller ? Follow the example below: View Principal.cshtml @se...
asked by 05.11.2015 / 12:44
2
answers

Error when forcing XML file download C #

I have a list of invoices where I can download XML, but there is a company server below the XML file that comes with the HTML of the page. The XML download code works normally on all servers where the application is installed except on that clie...
asked by 25.09.2015 / 22:29
1
answer

Data conversion error

I can not open my user control form. private void usuáriosToolStripMenuItem_Click(object sender, EventArgs e) { Usuarios USU = new Usuarios(); sNome_usu = Status_Label_Usuario.Text; USU.iAcesso_Usuario = Convert.ToI...
asked by 07.11.2015 / 12:30
1
answer

Action is not receiving the value of the parameter

In the code below I'm trying to pass a parameter to an Action. The action is being called and the value of the parameter is also being assigned to Url. However Action takes Null, not the parameter value. @using (Html.BeginForm("Buscar", "Terap...
asked by 06.11.2015 / 12:43
1
answer

Panel does not become invisible if the paint chart event is activated

Good evening, People would like a help, with a doubt, well I'm developing an application, in which the user chooses 5 dates of any useful days of the month, and generates a differentiated chart with the quote of each day, right, that graph (T...
asked by 09.11.2015 / 23:46
1
answer

Disable button when selecting item in DataGrid

I have a DataGrid with records and an Edit button. At the moment I'm doing the following: the user selects the item from the DataGrid and clicks the Edit button, to then be checked whether or not it can edit the record. I would like to disable t...
asked by 23.09.2015 / 19:13
1
answer

Update a viewbag (c # razor) with a javascript variable

Maybe what I want to do may be impossible, due to server and browser side issues, but I'd like to do the following: <script> function pegarId(id) { $('@ViewBag.Id').value = $(this).attr("id"); } </script>...
asked by 30.09.2015 / 07:04
2
answers

DropDownList in views asp.net mvc error in validation

In view razor of asp.net mvc I have a dropdownlist with the following code: @Html.DropDownListFor(model => model.Banco, (SelectList) ViewBag.Banco, new {@class = "form-control"}) Even if you select the value, when it...
asked by 11.01.2016 / 13:10