Posts by PedroBelino • 176 points
19 posts
-
1
votes1
answer171
viewsQ: What is Asp:Content?
What the hell is he? What does he do? 'Cause I can’t get one <body> inside him? I can change something in it via CSS? Type of project I did, vs default does not let the page run without this…
-
0
votes1
answer104
viewsQ: How to select only the first row of row_number
SELECT SA.RA, PP.NOME, SC.COMPLEMENTO, SPL.ANO, ROW_NUMBER() OVER(PARTITION BY SA.RA ORDER BY SPL.ANO ASC) AS U_PERLET I am doing this select, is returning all data with a count, the count is done…
sql-serverasked PedroBelino 176 -
1
votes1
answer118
viewsQ: How to add a column with text in gridview by code Behind?
I make a SELECT in the bank and mount my gridview, after that I make another SELECT and needed to add an extra column with the values that came. I have a Foreach to go through all the lines of the…
-
1
votes1
answer46
views -
0
votes1
answer46
viewsQ: null check on substring
I need to have a check in case I don’t have a comparison with some null value, I’m not able to make it work this condition. AND SUBSTRING(CAST(CONVERT(NVARCHAR(10),LE.DTHREMPRESTIMO,103) AS…
sql-serverasked PedroBelino 176 -
1
votes2
answers145
viewsA: checkar checkbox of gridview based on database value
In my query returns several lines, so I created an index in it to have control: int index = 0; while (reader.Read()) { domUsuario item = new domUsuario(); item.COLIGADAIN =…
-
3
votes2
answers145
viewsQ: checkar checkbox of gridview based on database value
My application needs to release types of accesses, for example, we have 5 branches and such person needs to access content from only 3 branches. The ADM user, can create or edit new users. When…
-
0
votes1
answer36
viewsQ: What use is the Viewstate?
In an application where I started maintenance, there are several mentions in the code. And so I would like to know what it is and also what it serves and stay more in touch with what the application…
c#asked PedroBelino 176 -
0
votes2
answers1339
viewsA: Open PDF in browser automatically after download
Served here with me, variable "file" bring his name. ScriptManager.RegisterStartupScript(Page, Page.GetType(), "popup", "window.open('../files/Reports/" + arquivo + "','_blank')", true);…
-
0
votes2
answers6437
viewsA: Open Whatsapp when you click on the icon
Place an icon and click this link with the desired number. https://api.whatsapp.com/send?phone=+5519999999999…
-
-1
votes1
answer42
viewsQ: Confirmation notice
I am in a project in ASP.NET and I entered a situation where you need a warning for a button. This button deleted the file, but without any kind of confirmation and in case of unintentional clicking…
asp.netasked PedroBelino 176 -
0
votes1
answer42
viewsA: Confirmation notice
As described in the question, in some researches, I was able to solve only using js within my application even though in Asp.net. A very simple way was to put the Onclientclick on the button itself…
asp.netanswered PedroBelino 176 -
1
votes2
answers485
viewsQ: Functionality of ! Ispostback
What is the real usefulness of this if(!Ispostback) of the page_load of the aspx pages? protected void Page_Load(object sender, EventArgs e) { if(!IsPostBack) { //codigo } }…
-
0
votes2
answers1682
viewsA: Get data from each row of a column in C#
Using the @Cleidson_eng example, I did it in an application of mine to recover the values and go adding and at the end present the final value. If I help you in any way, follow: protected void…
c#answered PedroBelino 176 -
0
votes2
answers315
viewsA: Write Fileupload Path inside an ASP.NET Updatepanel
With panel also could not, and using hiddenfield here worked! See if the example is useful. At the end will be the name and extension: string fileName; if (fuArquivo01.HasFile) { fileName = null;…
-
0
votes1
answer48
viewsQ: Remove characters 0 to left of a string c#
I came across a situation, I need to recover the user code that comes for example like this: '000063'. But my need was to take only the value of '63', use the . Trimstart would be a good option?…
c#asked PedroBelino 176 -
16
votes3
answers246
viewsQ: What is a modal?
I started to maintain a project that is not mine, in ASP.NET and C#. but I believe that it serves other languages as well. In some actions of buttons appears this term "modal" and I am in doubt of…
-
0
votes2
answers581
viewsA: Get the ID of a line from a Gridview query
See if this example fits: protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { try { int id = Convert.ToInt32(e.CommandArgument); if (e.CommandName.Equals("Detalhar")) {…
-
0
votes2
answers407
viewsA: Completion of mandatory fields
I got it a different way, it was like this: protected void Page_Load(object sender, EventArgs e) { if(!IsPostBack) { txtNome.Attributes["required"] = "true"; masked.Attributes["required"] = "true";…