Questions tagged as 'c#'

2
answers

How to manipulate title="" by C #?

Is it possible to put the text of the title="" attribute by c #? " The title I want to manipulate is: <asp:HyperLink runat="server" ID="linkTitle" CssClass="link_title search-result-link-title tooltip-init" Target="_top" data-toggle="too...
asked by 04.08.2016 / 00:35
2
answers

Capture TextBox that called the event

I want to implement the wind GotFocus in a TextBox , so that when it gets focus, it sets the Text property to string.empty . However, I have 6 TextBox that will execute this event. How do I identify which TextB...
asked by 09.05.2017 / 02:53
3
answers

How to create login and user in SQL Server passing command line through Visual Studio passing parameters? [closed]

public void CriaUsuarioSystem(string userSystem, string pwSystem) { try { conexao = new SqlConnection(conexao_BD); SqlCommand creatUserSystem = new SqlCommand("CREATE LOGIN @login WITH PASSWORD = @pw " +...
asked by 09.05.2017 / 21:59
3
answers

Fill string with blank boxes [duplicate]

I need to format a string so that it contains only 30 characters. If you have less than 30, you should fill in the blanks, and if you have more, you should leave it with only 30. I know you should have a way to do + - like this: string...
asked by 08.03.2017 / 20:04
2
answers

Problem sending model to controller

I'm having trouble forwarding my model to the control: Class: public class Pessoa { public virtual long Id {get; set;} public virtual string Nome {get; set;} public virtual ETipo Tipo {get; set;} public...
asked by 31.03.2017 / 19:17
1
answer

Dispose () method

dispose() frees the object from memory, right? I do not know when it is necessary to use it. For example, I have a page, on this page there is listBox com visible = "false" , in an event this listBox becomes true...
asked by 23.12.2016 / 14:00
4
answers

How to hide the time of a "DateTime?" field in the user interface?

The time is showing up for the user. My question: is it possible to hide the time and show only the date? How are you looking: Modelcode: View code:     
asked by 05.02.2014 / 18:32
2
answers

Passing Javascript data to C #

I need to get a user's location, pass it to C #, get their street data and show it on a label. I have the following code: Labels <asp:Label ID="lblMsg" runat="server" Visible="true"></asp:Label> <asp:Label ID="lblLatitud...
asked by 26.02.2014 / 21:09
2
answers

What is the simplest way to retrieve certain elements of an XML with Linq?

I have the following XML : <clientes> <cliente> <documentos/> <livros> <livro nome="Nome1"/> <livro nome="Nome2"/> </livros> </cliente&g...
asked by 31.01.2014 / 19:44
3
answers

Calling Controller Method

I'm doing a project for the Faculty, and I'm having a hard time understanding how to create a button and call an ActionResult on the Controller, and wanted to know if the action needs to be on the corresponding controller of the respective Model...
asked by 28.10.2016 / 04:32