Click here to Skip to main content
15,919,931 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Get the Last value from the given textbox value Pin
eyeseetee27-Jul-08 21:28
eyeseetee27-Jul-08 21:28 
AnswerRe: Get the Last value from the given textbox value Pin
nagendrathecoder27-Jul-08 23:23
nagendrathecoder27-Jul-08 23:23 
GeneralRe: Get the Last value from the given textbox value Pin
Reelix27-Jul-08 23:46
Reelix27-Jul-08 23:46 
GeneralRe: Get the Last value from the given textbox value Pin
nagendrathecoder27-Jul-08 23:49
nagendrathecoder27-Jul-08 23:49 
AnswerRe: Get the Last value from the given textbox value Pin
sandhya1427-Jul-08 23:24
sandhya1427-Jul-08 23:24 
GeneralRe: Get the Last value from the given textbox value Pin
nagendrathecoder27-Jul-08 23:42
nagendrathecoder27-Jul-08 23:42 
QuestionMenu items direction Pin
TheEagle27-Jul-08 20:28
TheEagle27-Jul-08 20:28 
AnswerRe: Menu items direction Pin
eyeseetee27-Jul-08 21:33
eyeseetee27-Jul-08 21:33 
GeneralRe: Menu items direction Pin
TheEagle27-Jul-08 21:44
TheEagle27-Jul-08 21:44 
QuestionSession Time Out Pin
Jaydev Jangid27-Jul-08 20:26
Jaydev Jangid27-Jul-08 20:26 
AnswerRe: Session Time Out Pin
eyeseetee27-Jul-08 21:54
eyeseetee27-Jul-08 21:54 
AnswerRe: Session Time Out Pin
Reelix27-Jul-08 23:48
Reelix27-Jul-08 23:48 
QuestionTreeview from two datasources Pin
TheEagle27-Jul-08 20:20
TheEagle27-Jul-08 20:20 
Question2-Tier application using ASP.Net 2.0 Pin
Samiullah27-Jul-08 19:28
Samiullah27-Jul-08 19:28 
AnswerRe: 2-Tier application using ASP.Net 2.0 Pin
Paul Conrad27-Jul-08 19:43
professionalPaul Conrad27-Jul-08 19:43 
QuestionFor Loop Suggestion Plz Pin
Member 387988127-Jul-08 18:58
Member 387988127-Jul-08 18:58 
Hi Guyz Good Morning,

I want to know the following for loop is corrcet or not,

Everything going on well in that for loop...,

But i feel for each data table the loop is going on more than once...,

Its possible to do any modification in that...,

Plz give me ur suggestion abt this:

for (int i = 0; i < DS.Tables.Count - 1; i++)
{
System.Web.UI.WebControls.DataGrid grid = new System.Web.UI.WebControls.DataGrid();
grid.HeaderStyle.Font.Bold = true;

foreach (DataRow dr1 in DS.Tables[i].Rows)
{
foreach (DataRow dr2 in DS.Tables[i + 1].Rows)
{
if (dr1["MID"].ToString() == dr2["MID"].ToString())
{
if (!Directory.Exists(_path + "\\" + dr1["EID"].ToString() + @"\"))
{
Directory.CreateDirectory(_path + "\\" + dr1["EID"].ToString() + @"\");
string _XLSPATH = _path + "\\" + dr1["EID"].ToString() + "\\" + dr1["Name Of Employee"].ToString() + ".xls";

using (StreamWriter sw = new StreamWriter(_XLSPATH))
{
using (HtmlTextWriter hw = new HtmlTextWriter(sw))
{
grid.DataSource = DS.Tables[i];
grid.DataBind();
grid.RenderControl(hw);
}
}
}
else
{
string _XLSPATH = _path + "\\" + dr2["EID"].ToString() + "\\" + dr2["Name Of Employee"].ToString() + ".xls";
using (StreamWriter sw = new StreamWriter(_XLSPATH))
{
using (HtmlTextWriter hw = new HtmlTextWriter(sw))
{
grid.DataSource = DS.Tables[i + 1];
grid.DataBind();
grid.RenderControl(hw);
}
}
}
}
else
{
if (!Directory.Exists(_path + "\\" + dr2["EID"].ToString() + @"\"))
{
Directory.CreateDirectory(_path + "\\" + dr2["EID"].ToString() + @"\");

string _XLSPATH = _path + "\\" + dr2["EID"].ToString() + "\\" + dr2["Name Of Employee"].ToString() + ".xls";

using (StreamWriter sw = new StreamWriter(_XLSPATH))
{
using (HtmlTextWriter hw = new HtmlTextWriter(sw))
{
grid.DataSource = DS.Tables[i + 1];
grid.DataBind();
grid.RenderControl(hw);
}
}
}
else
{
string _XLSPATH = _path + "\\" + dr1["EID"].ToString() + "\\" + dr1["Name Of Employee"].ToString() + ".xls";

using (StreamWriter sw = new StreamWriter(_XLSPATH))
{
using (HtmlTextWriter hw = new HtmlTextWriter(sw))
{
grid.DataSource = DS.Tables[i];
grid.DataBind();
grid.RenderControl(hw);
}
}
}
}
}
}
}

Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
QuestionHow to color some cells of table Pin
Rameez Raja27-Jul-08 18:41
Rameez Raja27-Jul-08 18:41 
AnswerRe: How to color some cells of table Pin
Venkatesh Mookkan27-Jul-08 18:49
Venkatesh Mookkan27-Jul-08 18:49 
GeneralRe: How to color some cells of table Pin
Rameez Raja27-Jul-08 18:56
Rameez Raja27-Jul-08 18:56 
GeneralRe: How to color some cells of table Pin
Venkatesh Mookkan27-Jul-08 19:10
Venkatesh Mookkan27-Jul-08 19:10 
QuestionIIS 7 with ASP Pin
Socheat.Net27-Jul-08 16:19
Socheat.Net27-Jul-08 16:19 
AnswerRe: IIS 7 with ASP Pin
Venkatesh Mookkan27-Jul-08 16:29
Venkatesh Mookkan27-Jul-08 16:29 
GeneralRe: IIS 7 with ASP Pin
Socheat.Net27-Jul-08 16:39
Socheat.Net27-Jul-08 16:39 
GeneralRe: IIS 7 with ASP Pin
Venkatesh Mookkan27-Jul-08 16:43
Venkatesh Mookkan27-Jul-08 16:43 
GeneralRe: IIS 7 with ASP Pin
Socheat.Net27-Jul-08 16:50
Socheat.Net27-Jul-08 16:50 

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.