Questions tagged as 'asp.net'

0
answers

How to validate the value of a parameter in the routes?

I am programming in asp mvc with c # and I have an action declared as follows: public FileResult ViewImage(int ImageFileItemId, int MaxWidth, int MaxHeight, bool FixedWidthHeight, string JpegQuality) . I would like to validate that t...
asked by 02.07.2018 / 17:49
1
answer

Fill TextBox with TextMode = Date of Asp.Net from Date SQL

I would like to know how I can fill a "Date" type textbox with a date obtained from a SQL Server table Currently I have it like this txtFecha.Text = (((DateTime)firstTable.Rows[0]["FechaCredito"]).ToString("dd/MM/yyyy")).ToString(); Bu...
asked by 02.07.2018 / 21:50
0
answers

Dynamic Nav asp.net core sql server

Hello, I would like you to help me. I am new to asp.net core and I am making a login that if it is correct enter and through the database of the procedure I return the menu according to the user who enters. That is, in the database I have made i...
asked by 27.06.2018 / 15:22
1
answer

Fill a DropDownList with Date. ASPX C #

Hello! How can I fill a DropDownList that stores me the last five previous dates beginning with, say, today? 06/28/2018 06/27/2018 06/25/2018 And when selecting a date I upload a GridView that is linked to a database; a table that contai...
asked by 28.06.2018 / 17:41
0
answers

Create txt file and download asp.net

byte[] binaryCertData = Convert.FromBase64String(lstSellosCliente[0].ArchivoCer); var objCert = new System.Security.Cryptography.X509Certificates.X509Certificate2(binaryCertData); StringBuilder objSB = new StringBuilder(); objSB.A...
asked by 26.06.2018 / 01:26
0
answers

How to show a value in a select of an edit view (scafolding) from a model

<div class="form-group"> @Html.LabelFor(model => model.Cantidad, htmlAttributes: new { @class = "control-label col-md-2" }) <div class="col-md-10"> <select class="form-control" id="Cantidad" name="Cantidad">...
asked by 26.06.2018 / 21:04
1
answer

Error System.Web.HttpException when doing a Response.Redirect

I have an action filter that validates me if there is a data or this is true or false to then redirect to an external url. Redirection works well. But I have the filter in my controller globally and when I enter the controller...
asked by 26.06.2018 / 15:41
0
answers

Default value in MVC5

I need to create a sequence that is inserted by default, that is, I need that when inserting a record it is inserted by default, example fn000001,fn000002, ect. help     
asked by 02.07.2018 / 15:03
0
answers

hide and show a div from another view by obtaining URL variable value

This is the code on the Origin page <li class=" column list-group-item float-e-margins"> <a href="~/Questions/Questions?valor=1"> <span class=" label label-primary">REGISTRO</span> </a> </li>...
asked by 02.07.2018 / 14:43
0
answers

show sql data in asp .net?

I have the following code to show data from a selected sql and I want to show that data in the following way, but it does not show them to me. And if I put it inside a repeater "he repeats it several times" and I only want to show it once....
asked by 21.06.2018 / 17:12