Questions tagged as 'asp.net-mvc'

1
answer

How to add a span in a htmlhelper?

I have this helper <li>@Html.ActionLink("Registar", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink"})</li> I wanted to add this <span class="glyphicon glyphicon-user"> <l...
asked by 07.05.2018 / 20:38
2
answers

MVC Encrypt / hide information according to user's role

Can anyone help encrypt information according to the user's role? Basically I want the following: if the user's function is="Admin" the Mobile number appears 435267456. If the User's function is="User" the Mobile number appears xxxxxxxxxx. I...
asked by 09.05.2018 / 10:32
1
answer

Visual Studio Error - Can not find name 'Record'

I'm working on an ASP.NET project with C # in Visual Studio 2015 and I came across error in the index.d.ts file. The error messages are Cannot find name 'Record' and Cannot find name 'undefined' . I saw that there would be so...
asked by 03.01.2018 / 17:49
1
answer

Error: Multiple controller types were found that match the URL

When requesting a service from my App, give me this error:    Multiple controller types were found that match the URL. This can   happen if attribute routes on multiple controllers match the requested   URL. \ R \ n \ r \ nThe request has fou...
asked by 08.11.2017 / 20:15
1
answer

Uploading videos DataType Asp.Net MVC

I want to put a Video Upload field on my Asp.Net MVC system and I did not find anything about videos in the DataType. I found Varied DataType such as [DataType(DataType.ImageUrl)] [DataType(DataType.Upload)] [DataType(DataType.Url)] Am...
asked by 08.02.2018 / 21:58
1
answer

The remote server returned an error: (400) Incorrect request

I have created two methods, one for authentication via certificate type A1 and A3 and another to send an xml, both of which make the request in a client apiect. In the authentication method, I send the data from my certificate to the client a...
asked by 27.04.2018 / 15:45
2
answers

TextBoxFor with whitespace

I have a TextBoxFor that lists the record of a table field. When displaying in the view, the textbox throws whitespace after displaying the contents of the record. I noticed that these spaces are to complete the StringLegth defined in the model...
asked by 18.10.2017 / 13:19
1
answer

How do I configure the homepage of my site?

I usually create my sites in MVC using the default template that comes in Visual Studio . Today I created a new project without using a template, and when I tested it, I got an error:    A default document is not configured fo...
asked by 09.07.2017 / 00:35
1
answer

C # - Use form data in IF

I'm trying to retrieve data from the form and need to use it in an IF. protected void btnSubmit_Click(object sender, EventArgs e) { try { if (txtLocalizacao.Text != "") { conn.Open(); SqlCommand...
asked by 30.06.2017 / 21:19
2
answers

Array of objects in ajax with mvc

I have a function that takes the variables from a list, creates the objects, and inserts into a list of objects. But I need to pass this list to the mvc driver; jquery function $(function() { jQuery.ajaxSettings.traditional = true; $("#save...
asked by 23.06.2017 / 19:23