Click here to Skip to main content
16,019,349 members
Home / Discussions / C#
   

C#

 
AnswerRe: DLL for Windows Forms? Pin
leppie11-Jun-08 23:17
leppie11-Jun-08 23:17 
AnswerRe: DLL for Windows Forms? Pin
Megidolaon12-Jun-08 0:34
Megidolaon12-Jun-08 0:34 
GeneralRe: DLL for Windows Forms? Pin
DaveyM6912-Jun-08 0:45
professionalDaveyM6912-Jun-08 0:45 
GeneralRe: DLL for Windows Forms? Pin
Megidolaon18-Jun-08 4:03
Megidolaon18-Jun-08 4:03 
QuestionReading a DTD file Pin
chanzeb11-Jun-08 20:59
chanzeb11-Jun-08 20:59 
AnswerRe: Reading a DTD file Pin
leppie11-Jun-08 23:16
leppie11-Jun-08 23:16 
GeneralRe: Reading a DTD file Pin
chanzeb11-Jun-08 23:24
chanzeb11-Jun-08 23:24 
QuestionC# asp.net coding related to datalist controls Pin
RAMTOY11-Jun-08 20:49
RAMTOY11-Jun-08 20:49 
I have a problem in the following coding

protected void DataList1_ItemDataBound1(object sender, DataListItemEventArgs e)
{
DBCode dbo = new DBCode(); //class
DataTable dt = new DataTable();
dt = dbo.getDataTable("select IsSold, IsNew from product");
int a, b;
int c = int.Parse(dt.Rows.Count.ToString());

for (int i = 1; i <= c-1; i++)
{
a = int.Parse(dt.Rows[i]["Issold"].ToString());
b = int.Parse(dt.Rows[i]["IsNew"].ToString());

if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
if (a == 1)
{
Label imgsold = e.Item.FindControl("lblsold") as Label; imgsold.Visible = true;
}
else
{
Label imgsold = e.Item.FindControl("lblsold") as Label; imgsold.Visible = false;
}
if (b == 1)
{
Label imgnew = e.Item.FindControl("lblnew") as Label; imgnew.Visible = true;
}
else
{
Label imgnew = e.Item.FindControl("lblnew") as Label; imgnew.Visible = false;
}
}

}
}

I want to enable and disable a label control with respect to the data coming from the database . this is actually a image gallery where i want make the image displayed with a tag new and sold . I have used datalist control and a two labels inside for displaying new and sold. but this code is not working so please help i am stuck in middle of the project

for further reference visit www.painternet.com/gallery.aspx

ram

AnswerRe: C# asp.net coding related to datalist controls Pin
Yosh_11-Jun-08 22:47
professionalYosh_11-Jun-08 22:47 
QuestionSQL View Class in C# .Net Pin
am 200911-Jun-08 20:20
am 200911-Jun-08 20:20 
AnswerRe: SQL View Class in C# .Net Pin
leppie11-Jun-08 20:40
leppie11-Jun-08 20:40 
QuestionOne Process for more processors on more server? Pin
softwarejaeger11-Jun-08 20:09
softwarejaeger11-Jun-08 20:09 
AnswerRe: One Process for more processors on more server? Pin
leppie11-Jun-08 20:42
leppie11-Jun-08 20:42 
GeneralRe: One Process for more processors on more server? Pin
softwarejaeger11-Jun-08 21:17
softwarejaeger11-Jun-08 21:17 
GeneralRe: One Process for more processors on more server? Pin
Ashfield11-Jun-08 22:10
Ashfield11-Jun-08 22:10 
Question.Net application in Vista platform, CAS !!!!!???? Pin
Abdul Gafoor11-Jun-08 20:00
Abdul Gafoor11-Jun-08 20:00 
AnswerRe: .Net application in Vista platform, CAS !!!!!???? Pin
stancrm11-Jun-08 20:08
stancrm11-Jun-08 20:08 
Questionstrange decimal rounding Pin
George_George11-Jun-08 19:23
George_George11-Jun-08 19:23 
AnswerRe: strange decimal rounding Pin
Christian Graus11-Jun-08 19:45
protectorChristian Graus11-Jun-08 19:45 
GeneralRe: strange decimal rounding Pin
George_George11-Jun-08 19:53
George_George11-Jun-08 19:53 
AnswerRe: strange decimal rounding Pin
Zoltan Balazs11-Jun-08 22:13
Zoltan Balazs11-Jun-08 22:13 
GeneralRe: strange decimal rounding Pin
George_George12-Jun-08 23:24
George_George12-Jun-08 23:24 
AnswerRe: strange decimal rounding Pin
S. Senthil Kumar12-Jun-08 21:07
S. Senthil Kumar12-Jun-08 21:07 
GeneralRe: strange decimal rounding Pin
George_George12-Jun-08 23:23
George_George12-Jun-08 23:23 
AnswerRe: strange decimal rounding Pin
S. Senthil Kumar13-Jun-08 1:24
S. Senthil Kumar13-Jun-08 1:24 

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.