Click here to Skip to main content
15,896,727 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: problem while using md5 for password encryption Pin
ScottM128-May-09 20:35
ScottM128-May-09 20:35 
GeneralRe: problem while using md5 for password encryption Pin
Kissy1628-May-09 20:47
Kissy1628-May-09 20:47 
GeneralRe: problem while using md5 for password encryption Pin
Christian Graus28-May-09 21:13
protectorChristian Graus28-May-09 21:13 
GeneralRe: problem while using md5 for password encryption Pin
ScottM128-May-09 22:11
ScottM128-May-09 22:11 
GeneralRe: problem while using md5 for password encryption Pin
Kissy1628-May-09 23:38
Kissy1628-May-09 23:38 
AnswerRe: problem while using md5 for password encryption Pin
dwaipayan911-Aug-09 0:54
dwaipayan911-Aug-09 0:54 
QuestionLINQ to dataview........ Pin
pranavcool28-May-09 19:27
pranavcool28-May-09 19:27 
AnswerRe: LINQ to dataview........ Pin
padmanabhan N28-May-09 19:33
padmanabhan N28-May-09 19:33 
There is one .cs for converting linq to datatable
//.cs file
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Data;

public class LinqToDataTable
{
public static DataTable ObtainDataTableFromIEnumerable(System.Collections.IEnumerable ien)
{
DataTable dt = new DataTable();

try
{
foreach (object obj in ien)
{
Type t = obj.GetType();
PropertyInfo[] pis = t.GetProperties();

if (dt.Columns.Count == 0)
{
foreach (PropertyInfo pi in pis)
{
if (pi.PropertyType.Name == "Nullable`1")
{
string str = pi.PropertyType.FullName;
str = str.Replace("System.Nullable`1", "");
str = str.Substring(str.IndexOf("System"));
str = str.Substring(0, str.IndexOf(","));
dt.Columns.Add(pi.Name, str.GetType());
}
else
dt.Columns.Add(pi.Name, pi.PropertyType);
}
}

DataRow dr = dt.NewRow();
foreach (PropertyInfo pi in pis)
{
object value = pi.GetValue(obj, null);
dr[pi.Name] = value;
}
dt.Rows.Add(dr);
}
}
catch (Exception)
{
dt = null;
}
return dt;
}
}

//DataTable dtEmployees = LinqToDataTable.ObtainDataTableFromIEnumerable((IEnumerable)employees);

now assign the datatable in dataview

Padmanabhan

Questionhow to convert system.Drawing.Image to system.web.ui.webcontrols.image Pin
A k ch28-May-09 19:16
A k ch28-May-09 19:16 
AnswerRe: how to convert system.Drawing.Image to system.web.ui.webcontrols.image Pin
Christian Graus28-May-09 19:23
protectorChristian Graus28-May-09 19:23 
GeneralRe: how to convert system.Drawing.Image to system.web.ui.webcontrols.image Pin
A k ch28-May-09 19:31
A k ch28-May-09 19:31 
GeneralRe: how to convert system.Drawing.Image to system.web.ui.webcontrols.image Pin
Christian Graus28-May-09 20:09
protectorChristian Graus28-May-09 20:09 
GeneralRe: how to convert system.Drawing.Image to system.web.ui.webcontrols.image [modified] Pin
A k ch28-May-09 20:45
A k ch28-May-09 20:45 
QuestionHow to test my web application? Pin
Subin Alex28-May-09 18:58
Subin Alex28-May-09 18:58 
AnswerRe: How to test my web application? Pin
Christian Graus28-May-09 19:24
protectorChristian Graus28-May-09 19:24 
AnswerRe: How to test my web application? Pin
ScottM128-May-09 20:38
ScottM128-May-09 20:38 
AnswerRe: How to test my web application? Pin
Christian Graus28-May-09 21:11
protectorChristian Graus28-May-09 21:11 
QuestionProblem with LINQ to SQL classes Pin
sudhadotnet28-May-09 18:44
sudhadotnet28-May-09 18:44 
Questioncreate setup package visual studio Pin
sakis2428-May-09 11:49
sakis2428-May-09 11:49 
AnswerRe: create setup package visual studio Pin
Christian Graus28-May-09 12:54
protectorChristian Graus28-May-09 12:54 
GeneralRe: create setup package visual studio Pin
sakis2429-May-09 2:46
sakis2429-May-09 2:46 
Questionget data from website Pin
jainiraj28-May-09 6:48
jainiraj28-May-09 6:48 
AnswerRe: get data from website Pin
Ramesh Swaminathan28-May-09 7:04
Ramesh Swaminathan28-May-09 7:04 
QuestionSetFocus to a Textbox +AJAX Pin
Pawan Kiran28-May-09 5:33
Pawan Kiran28-May-09 5:33 
AnswerRe: SetFocus to a Textbox +AJAX Pin
Ramesh Swaminathan28-May-09 5:43
Ramesh Swaminathan28-May-09 5:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.