.Net developer

vbcrlf em c#

Equivalente ao VBCRLF para C#: System.Environment.NewLine

CS0016: Could not write to output file 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\xxxxxx\xxxx

Description: An error occurred during the compilation of a resource
required to service this request. Please review the following specific
error details and modify your source code appropriately.

Compiler Error Message: CS0016: Could not write to output file
'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\wholesales\xxxxx\xxxxx\App_Code.xxxxxxx.dll' -- 'Access is
denied. '

After some antivirus activities, my partner development machine face
issue above.


This may due to some permission setting in Temp folder. To solve it,


1. Go to %Systemroot%, normally C:\WINDOWS or C:\WINNT
2. Right-click the Temporary folder (mine is C:\WINDOWS\Temp) and
select Sharing and Security. Select the Security tab and take a look
at the list of "Group or user names:"
3. NETWORK SERVICE should be in the list. If it is not, click Add and
type Network Service in the text box:


4. Make sure NETWORK SERVICE have Full Control in the Permissions list.


5. Click OK.


6. Restart IIS (Run iisreset)


Test on the web, and it solved.

Como ordenar registros de um Dataset

Como dar um order by num dataset

DataSet ds = objeto.MetodoQueRetornaUmDataset()
DataView dv = ds.Tables[0].DefaultView;
dv.Sort = "NOME_CAMPO_PARA_ORDENAR ASC";
ds.Tables.Clear();
ds.Tables.Add(dv.ToTable());

definindo a propriedade Text de um campo password em c#

campo textbox em .Net do tipo password vem sem value carregado, quando
é abastecido ( como num load do BD ). O que fazer?
Não usar textbox.Text = "valor".. Adicione via attributes:
textbox.attributes.add("value","valor");

Mas cuidado: Este valor definido via attributes é visivel no codigo fonte html .