Posts by pnet • 14,727 points
909 posts
-
0
votes4
answers2129
viewsA: SQL query with ID from a combobox - C#
@Vinicius Caminha, you can use the Selectedvalue . Where meucampo = combobox.SelectedValue;
-
8
votes2
answers19790
viewsQ: Delete all tables from a database at once
Is there a way for me to erase an entire database at once? Isn’t it drop, is to delete only the records of all tables belonging to the database.
-
2
votes1
answer1066
viewsQ: Explanation about redirect loop
I p/ a meeting and will ask why have some data Redirect Loop. In the code, I put a false parameter and it has solved, but turns and moves it back. The question is: What is a redirect loop? What I…
-
5
votes1
answer1589
views -
1
votes1
answer423
viewsA: How to verify that all elements of a list satisfy the same condition using a lambda expression?
I did so and settled with All: vbolErroDocTorObrigatorio = vlstDados.All(l => l.IcObrigatorio == 0 && String.IsNullOrEmpty(l.DsPathDocume I got the answer in the OS in English.…
-
1
votes1
answer423
viewsQ: How to verify that all elements of a list satisfy the same condition using a lambda expression?
I have a class that represents an entity in the database. This class runs a Procedure that returns its data. I created a list of the type and this list is loaded. Let’s assume that this is the list…
-
0
votes0
answers104
viewsQ: Redirect loop problems when calling page
I made that if and is giving redirect loop. I removed the parameter false and continues. The page exists and etc... if (Session["DsTipoUsuario"].ToString() == "1") {…
-
2
votes3
answers461
viewsQ: Make a cascaded Else inside a for
See below my for. Within that for there are some IF's. I don’t want another for to scroll through the same list. There is a if which validates whether IcObrigatorio == 1 and below it validates…
-
0
votes2
answers150
viewsQ: make a component in a Repeater get enabled=false
I have a button inside a Peater. As it is in a Peater, it only appears in the Databind() of the Peater. Using the variable and the event, I can get to that component like this: protected void…
-
0
votes2
answers2142
viewsA: Bring certain field, by MAX(ID)
So you did, but I had to put a subquery in the play select campo2 from tabela where campo3= 49 and campo1 in (select max(campo1) from tabela where campo3 = 49) So you decided.…
sql-serveranswered pnet 14,727 -
0
votes2
answers2142
viewsQ: Bring certain field, by MAX(ID)
How do I bring in any field, by the largest table ID. I did a MAX(Campo1), Campo2 and had to make a grouping by Campo2 and the result he brought me several Campo2 and not only one, which has the…
sql-serverasked pnet 14,727 -
1
votes1
answer163
viewsA: Problems with sorting within a Repeater
I couldn’t do it in Repeater, so I added another field just to sort it out, it was the only resource I could get. In Peater I could not do.
-
0
votes1
answer163
viewsQ: Problems with sorting within a Repeater
I have to: <asp:Repeater ID="rptDocumentosRepeater" runat="server"><%--onitemdatabound="listaDocumentosRepeater_ItemDataBound"--%> <HeaderTemplate> <legend…
-
1
votes3
answers2429
viewsA: Calling event from within code
Thus resolved: protected void rdbGarantiaConfissao_SelectedIndexChanged(object sender, EventArgs e) { NomeMetodo(sender); } private void NomeMetodo(object sender){ //Declarações RadioButtonList…
-
1
votes3
answers2429
viewsQ: Calling event from within code
I have this event in my code: protected void rdbGarantiaConfissao_SelectedIndexChanged(object sender, EventArgs e) { //Declarações RadioButtonList vrblAprovado = sender as RadioButtonList; try {…
-
2
votes2
answers441
viewsQ: Recreate tables without dropping
I have an already populated table. In it there is a field not null, which I need to set to null. In graphical mode does not accept and says I have to recreate the table. Is there a way to do this…
-
2
votes2
answers528
viewsA: Button event with Asp.net
onclick="btnMeuBotao_Click" and not onclick"testeBotao" and in the Behind: protected void btnMeuBotao_Click(object sender, EventArgs e) {....}…
-
0
votes1
answer114
viewsQ: Difficulty hiding part of a form with Usercontrol
I have a form called frmCadastroBens that declares a Usercontrol, which I call wucCadastroBens. In this form I register the UC like this: <%@ Register src="WUC/wucCadastroBens.ascx"…
-
0
votes0
answers228
viewsQ: Difficulty mounting calculation with jquery
It was made a jquery function by a fellow designer, to meet the following need. I have a table, which works inside a Repeater, in which it works as a grid. This table has 4 <TD>. There is a TD…
-
0
votes1
answer39
viewsQ: Radiobuttolist does not obey the selected Selectedvalue
I have this Radiobutton: <asp:RadioButtonList ID="rdlCpfCnpjFornecedorBemNovo" CssClass="cPFCNPJRadioButtonList" runat="server" RepeatDirection="Horizontal" AutoPostBack="false"…
-
4
votes3
answers1491
viewsQ: Add field at position I want in sql server
Every time I make one ALTER TABLE and add a column, this field goes to the end. In design mode, using the Sql Management graphical tool, there is the Insert Column option at any position, but it…
-
1
votes1
answer347
viewsA: Changing a linkbutton’s Text attribute inside a table in a Retpeater
I solved the problem. Actually my IF is correct. Turns out it was inside a table, it broke the layout and, frankly, it looked like there were two buttons. As it was very tight, when inspecting, only…
-
1
votes1
answer347
viewsQ: Changing a linkbutton’s Text attribute inside a table in a Retpeater
I have this linkbutton: <td><asp:LinkButton ID="lkbEnviarDocumentos" CssClass="acessos" Text="Documentos" runat="server" /></td>} %> When that condition is true…
-
0
votes1
answer54
viewsQ: Radiobuttonlist does not accept if Selectedindx
I have this Radiolist declared: <label>Aprovar</label> <asp:RadioButtonList ID="rblAprovar" runat="server" RepeatLayout="Flow" RepeatDirection="Horizontal"> <asp:ListItem…
-
0
votes1
answer57
viewsQ: Parameter in URL is coming null
I have a page that will call another as below. if (hdfCdTipoStatus.Value == "2") Response.Redirect("/frmANACadastroBens.aspx?/CdProcesso=" +…
-
7
votes5
answers2024
views -
14
votes1
answer41651
viewsQ: Format value with Brazilian currency mask
I have a stored trial that returns a credit amount for a certain consortium quota. The return of that value would be like this: 167900. But it should be so: R$ 167.900,00. This value I feed a…
-
3
votes1
answer4300
viewsA: Recover value from an HTTP query string
Try this and see if it solves. string nome = Request.QueryString["name"]; string idade = Request.QueryString["age"];
-
1
votes4
answers6715
viewsA: How to clear form fields in c#?
I usually create a cleaning method only. There are how to make generic methods, for all controls, but I do one for each situation, will your preference. Avoid using TextBox1.Text = ""; instead…
-
1
votes1
answer329
viewsA: DLL to encrypt a string
Define public methods in your DLL, add her reference to your project, and then exchange information between your project and the DLL. To generate, every project you compile becomes a DLL in the bin…
-
1
votes1
answer477
viewsA: Turning SQL Code to LINQ
There is an application that does this, the Linqpad. Below the address to download it. http://www.linqpad.net/whylinqbeatssql.aspx http://www.linqpad.net/ There is also LINQER. Below the url:…
-
0
votes1
answer97
viewsQ: Concatenate aps.net expressions with literal text
I have that expression: <asp:Label Text='<%# Eval("Analista") %>' runat="server" /><br /> The result is Approved or Disapproved. I would like to add the following word: by: In…
-
0
votes1
answer165
viewsQ: My Repeater does not render in the browser
I created a Repeater and I can’t render it. When I inspect the object, it doesn’t appear. I took the code above it, called Analyze registration data and repeated after the Reset and can view, but…
-
3
votes1
answer1711
viewsQ: How to open a . Net dll
I arrived at the company and already got a program in progress and the previous developer left the company. The program is well done. The executions of procedures and tables are within a dll and I…
-
1
votes1
answer438
viewsQ: Panel can’t give a Visible=true on it
I have a panel and inside it a Repeater with a table. This panel is inside a user control. I use this UC in several situations. I created a method called AplicarCaracteristicas, Depending on the…
-
0
votes2
answers710
viewsQ: Server Too Busy
I constantly have this situation: Server Too Busy when I run my webforms application. What should I do to resolve this situation? I think it’s IIS Express, but I’ve been told it could be a database.…
-
1
votes1
answer368
viewsA: Play an html class within an Asp.net code
I resolved so: <strong><a <%# Eval("DsPathDocumento") != null && !String.IsNullOrEmpty(Eval("DsPathDocumento").ToString()) ? String.Concat("href='/UpLoads/",…
-
1
votes1
answer368
viewsQ: Play an html class within an Asp.net code
I have that code: <%# Eval("DsPathDocumento") != null && !String.IsNullOrEmpty(Eval("DsPathDocumento").ToString()) ? String.Concat("href='/UpLoads/", Eval("DsPathDocumento"), "'") :…
-
-1
votes1
answer110
viewsQ: I cannot assign javascript function only when there is an attachment
I have that code: <strong><a <%# Eval("DsPathDocumento") != null && !String.IsNullOrEmpty(Eval("DsPathDocumento").ToString()) ? String.Concat("href='/UpLoads/",…
-
3
votes3
answers205
viewsQ: Problems with logic (&& or ||)
I found strange the code that is in my system: if (cmbCdTipoProcesso.SelectedValue != "3" && cmbCdTipoProcesso.SelectedValue != "4") {....} Apparently the code is weird, 'cause I’ll never…
-
0
votes1
answer526
viewsQ: Doubt about the use of multiple user control on the same page
The most difficult thing here is to ask the question the right way not to get downvote, but come on. I will try to explain it well, because doubt is complex or boring. I will ask punctual questions…
-
0
votes1
answer381
viewsQ: How to fill Textboxes?
I wouldn’t want to use several if's to control a method of mine, unless there is no way to do it without the if's. I write in a list, the return of the BD that may or may not have banking…
-
0
votes1
answer722
viewsA: How to search on a dropdownlist?
cmbBancos.SelectedValue = nm_banco; cmbBancos_SelectedIndexChanged(this, EventArgs.Empty);
-
-1
votes1
answer379
viewsQ: Combo or Dropdownlist display a Text according to its value
I do a search of my comic book and I bring in, say, number 237. This is the value of my Combo that is equivalent to the text Bradesco S/A. So I would like the Dopdownlist to display this text…
-
0
votes1
answer805
viewsQ: How to call the Selectedindexchanged event a method
As I call the Selectedindexchanged event of a Dropdownlist in another method. Webform usage.
-
-3
votes1
answer722
viewsQ: How to search on a dropdownlist?
I have a Dropdown that lists the names of all the banks. I need to create a method in which he brings me a set of results and among them the name of the bank. This database that my list brings (only…
-
8
votes2
answers3396
viewsQ: What is the use of methods with an "inter-ternal" modifier?
In what situation I would use a modifier method internal? There is a specific reason for this, namely where a public or private does not answer or does not answer? That’s what I got here. internal…
-
2
votes1
answer51
viewsQ: How do I use the VS Command Window?
How do I use Command Window? I have never used this tool to debug.
-
12
votes2
answers1715
viewsQ: Back previous position in Visual Studio
When we want to see some method, we press F12 and then we are "transported" to the said method. It turns out that this method can be in another project or other form or in one user control etc and…
-
0
votes1
answer74
viewsQ: Assemble link only when there is data
I have a webforms application. In this application I have this line in my Asp.net. <strong><a href="/UpLoads/<%# Eval("DsPathDocumento")%>" class="linkUpload"><%#…