Login
...or Sign up
Home
Search
Search Code Snippets
Search People
Code Snippets of
vela
Public Function getTamFile(ByVal path As String) As String Dim fi As New FileInfo(path) If fi.Exists Then If (fi.Length / 1024) > 1024 Then Return Math.Round(((fi.Length / 1024) / 1024), 2).ToString() & " Mb" Else Return Math.Round((fi.Length / 1024), 2).ToString() & " Kb" End If Else Return String.Empty End If End Function
Método para obtener el tamaño de un fichero
Uploaded on
10/10/2008 6:49:43 AM
0 comments
Programming Language:
vb.net
fichero
tamaño
Public Shared Function getListadoEnlaces(ByVal ds As DataSet, ByVal texto As String, ByVal enlace As String, ByVal title As String, ByVal titulo_listado As String, ByVal siVacio As String) As String Dim i As Integer Dim listado As String listado = titulo_listado listado += "<ul>" For i = 0 To ds.Tables(0).Rows.Count - 1 If title = String.Empty Then listado += "<li><a href='" & ds.Tables(0).Rows(i)(enlace) & "'>" & ds.Tables(0).Rows(i)(texto).ToString() & "</a></li>" Else listado += "<li><a href='" & ds.Tables(0).Rows(i)(enlace) & "' title='" & ds.Tables(0).Rows(i)(title).ToString() & "'>" & ds.Tables(0).Rows(i)(texto).ToString() & "</a></li>" End If Next listado += "</ul>" If ds.Tables(0).Rows.Count = 0 Then Return siVacio Else Return listado End If End Function
Crear una lista de enlaces desde un DataSet
Uploaded on
8/28/2008 2:30:01 AM
0 comments
Programming Language:
vb.net
accesibilidad web
dataset
html
lista de enlaces
System.IO.MemoryStream ms = new System.IO.MemoryStream(buffer); System.Drawing.Bitmap b = (System.Drawing.Bitmap)Image.FromStream(ms); b.Save("fichero.png", System.Drawing.Imaging.ImageFormat.Png);
Pasar un array de bytes a un fichero
Uploaded on
8/17/2008 12:31:19 PM
0 comments
Programming Language:
c#
array
file
image
protected void dgEjemplo_ItemDataBound(object sender, DataGridItemEventArgs e) { DataGridItem dr; dr = (DataGridItem)e.Item; if (e.Item.ItemIndex > 0) { if (Int32.Parse(dr.Cells[3].Text)<0 ) { dr.Cells[3].ForeColor = System.Drawing.Color.Red; } else { dr.Cells[3].ForeColor = System.Drawing.Color.Green; } } }
Acceso a las filas de un DataGrid (web)
Uploaded on
8/17/2008 11:58:33 AM
0 comments
Programming Language:
c#
datagridview
Int32 i; String celda; DataGridViewCell dgc; //Recorremos el DataGridView con un bucle for for (i = 0; i < dataGridView1.Rows.Count; i++) { dgc = dataGridView1.Rows[i].Cells[0]; celda = ((String)dgc.Value) + "\r\n"; textBox1.Text += celda.Replace(".",","); }
Recorrer un DataGridView formateando una columna
Uploaded on
8/17/2008 11:40:27 AM
0 comments
Programming Language:
c#
datagridview
1
2
3
4
...
Help
Help by email
What is Naslu?
|
About Naslu
|
Contact
|
Terms of Use
|
Downloads
|
Blog
|
Top
Select language:
Español
|
English
© 2007 naslu.com