Click here to Skip to main content
15,910,234 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHi Friends, Pin
yadlaprasad16-Oct-07 3:25
yadlaprasad16-Oct-07 3:25 
AnswerRe: Hi Friends, Pin
Hesham Amin16-Oct-07 9:00
Hesham Amin16-Oct-07 9:00 
QuestionFormatting Reports Pin
macca2416-Oct-07 3:17
macca2416-Oct-07 3:17 
AnswerRe: Formatting Reports Pin
cst_cfit16-Oct-07 18:46
cst_cfit16-Oct-07 18:46 
QuestionHow to change image in repeater header Pin
Sandeep Akhare16-Oct-07 3:05
Sandeep Akhare16-Oct-07 3:05 
AnswerRe: How to change image in repeater header Pin
Christian Graus16-Oct-07 10:22
protectorChristian Graus16-Oct-07 10:22 
GeneralRe: How to change image in repeater header Pin
Sandeep Akhare16-Oct-07 19:34
Sandeep Akhare16-Oct-07 19:34 
Questionhow to display pictures in a datagrid Pin
fraijo16-Oct-07 2:51
fraijo16-Oct-07 2:51 
Hi Everyone

I'm using ASP.NET 1.1, MS SQL Server2000 and C#. There is a datagrid in one of the pages. It contains some rows, in this data, now I have only Yes or No for a particular column. But I need to display one image when the value is 'Yes' and another image for 'No'. Is this is possible? Please help me to do it. The detail code is giving below..

I put in the inline as

<asp:templatecolumn headertext="Diff">
<headerstyle horizontalalign="Center" width="5%" cssclass="TabCellHeader">
<itemstyle horizontalalign="Center">
<edititemtemplate>
<asp:image id="imgYesNo" runat="server" imageurl="<%# AddYesNoImage(DataBinder.Eval(Container.DataItem, "MyYesNoColumn").ToString()) %>">



and in the code behind,Item Data bound event of the grid

if (dTotal != dSum) e.Item.Cells[12].Text = "No";
else e.Item.Cells[12].Text = "Yes";

and

public string AddYesNoImage(string yesNo)
{

if (yesNo == "Yes") return "";

else return "";
}

I put the pictures in the images folder.

is this right?.. still I'm getting 'Yes' or 'No' instead of pictures.. Please help me

Thanks in advance Smile | :)

Fraijo



fraijo

AnswerRe: how to display pictures in a datagrid Pin
kubben16-Oct-07 3:15
kubben16-Oct-07 3:15 
QuestionHow to capture the date selected in a pop up Pin
rockyl16-Oct-07 2:40
rockyl16-Oct-07 2:40 
AnswerRe: How to capture the date selected in a pop up [modified] Pin
Sandeep Kumar16-Oct-07 3:00
Sandeep Kumar16-Oct-07 3:00 
AnswerRe: How to capture the date selected in a pop up Pin
kubben16-Oct-07 3:00
kubben16-Oct-07 3:00 
GeneralRe: How to capture the date selected in a pop up Pin
rockyl16-Oct-07 3:08
rockyl16-Oct-07 3:08 
GeneralRe: How to capture the date selected in a pop up Pin
kubben16-Oct-07 3:19
kubben16-Oct-07 3:19 
QuestionCreating a word report like report builder in sql reporting services Pin
pksahoo16-Oct-07 2:15
pksahoo16-Oct-07 2:15 
Questionxml Stream to remote client Pin
hansipet16-Oct-07 2:11
hansipet16-Oct-07 2:11 
AnswerRe: xml Stream to remote client Pin
Ennis Ray Lynch, Jr.16-Oct-07 4:59
Ennis Ray Lynch, Jr.16-Oct-07 4:59 
QuestionI want to display videos in asp.net Pin
Kurmala16-Oct-07 2:04
Kurmala16-Oct-07 2:04 
AnswerRe: I want to display videos in asp.net Pin
John-ph16-Oct-07 2:08
John-ph16-Oct-07 2:08 
GeneralRe: I want to display videos in asp.net Pin
Kurmala16-Oct-07 2:12
Kurmala16-Oct-07 2:12 
GeneralRe: I want to display videos in asp.net Pin
Kurmala16-Oct-07 2:30
Kurmala16-Oct-07 2:30 
GeneralRe: I want to display videos in asp.net Pin
cst_cfit16-Oct-07 18:50
cst_cfit16-Oct-07 18:50 
Questioni need help to get one layer/pop menu by clicking checkbox Pin
nirmalaakki16-Oct-07 1:55
nirmalaakki16-Oct-07 1:55 
AnswerRe: i need help to get one layer/pop menu by clicking checkbox Pin
Sandeep Kumar16-Oct-07 2:10
Sandeep Kumar16-Oct-07 2:10 
QuestionDisabling the Close button using javascript [modified] Pin
manowj16-Oct-07 1:47
manowj16-Oct-07 1:47 

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.