Questions tagged as 'asp.net-mvc'

1
answer

Why this @Html.DropDownListFor does not accept htmlAttributes?

I have a View that will be read-only in some cases. And I do not want to use javascript because it can be disabled on the user side. In the end ... When I do this (for testing) it works perfectly. <div class="form-group"> @Html.LabelF...
asked by 16.11.2017 / 11:50
1
answer

How do I include a line at the beginning of a text file? [closed]

My system generates a text file, and based on the sum of one information in each line, it calculates a check digit. However, this result should be in the first line of the file, how can I include this line at the beginning?     
asked by 28.08.2017 / 16:00
1
answer

Change controller name without losing information

I have a Controller called Home and I'm trying to change it to BPA. I want to know if I just change the name HomeController to BpaController and change the name of the Home folder in the View folder. Or if you need to change...
asked by 29.08.2017 / 23:19
1
answer

With sending attachment via email via ASP.NET application

I already have a method in my controller that sends email. Now you need to see attachment (all attachment types, jpg, pdf, doc ...); string strPara = Request.Form["email"]; string strDe = "[email protected]"; string...
asked by 22.06.2018 / 21:22
1
answer

Infinite Menu with recursive function

I would like to know how I can create a recursive interface. I have a set of menus, these menus are parents having children and so on, there being no maximum number of children. I would like to find a solution to this problem, I left what I have...
asked by 13.07.2017 / 11:32
1
answer

Consist of the button back page in MVC

I have a web application .net mvc for satisfaction survey, where the user prefix all the data and click on the end button. The system saves the search data and redirects it to another page and sends a message that ends. But the users click back,...
asked by 05.07.2017 / 13:06
1
answer

How to do security by profile with Asp.Net MVC?

I'm creating a system using Asp.Net MVC and before I start I need to do profile-based security. I will have several profiles each with an access option. For example: Administrator Profile (access all), Common Profile (restricted access), Advance...
asked by 02.09.2017 / 20:00
1
answer

Collect View data for the controler

I would like to know how I can collect a View data, and I'm already using @model System.data.dataset. @model System.Data.DataSet @{ ViewBag.Title = "CadastroPorto"; } I need to collect the data that will be typed in this part below when...
asked by 02.07.2017 / 23:20
1
answer

How to use javascript code inside if Razor?

In my view, I have following code: <script type="text/javascript"> @if(Model.File == true) { //Como usar javascript aqui ? //Exemplo: $("#target").click(function() { alert("Handler for .click() calle...
asked by 13.06.2017 / 02:06
2
answers

Send data to an ActionResult from a Controller other than the current one

How to make a post sending data to a ActionResult of a Controller different from the current%? Example: I have a link called lnkEnviarDados and I need to make a post on the page by sending the contents of the vari...
asked by 11.06.2017 / 15:17