Click here to Skip to main content
15,881,281 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: how can i build a search engine with c#.net Pin
GaryWoodfine 18-Feb-07 12:22
professionalGaryWoodfine 18-Feb-07 12:22 
QuestionSMTP - Trouble sending message in ASP.Net but not as a C# application on my machine? Pin
hetrobezz17-Feb-07 23:13
hetrobezz17-Feb-07 23:13 
AnswerRe: SMTP - Trouble sending message in ASP.Net but not as a C# application on my machine? Pin
badgrs18-Feb-07 0:51
badgrs18-Feb-07 0:51 
Questioncrystal report viewing problem Pin
jabbarsb17-Feb-07 19:46
jabbarsb17-Feb-07 19:46 
QuestionAJAX or ASP for Dynamic web form creation? Pin
jrshack17-Feb-07 17:44
jrshack17-Feb-07 17:44 
AnswerRe: AJAX or ASP for Dynamic web form creation? Pin
badgrs18-Feb-07 0:49
badgrs18-Feb-07 0:49 
GeneralRe: AJAX or ASP for Dynamic web form creation? Pin
jrshack18-Feb-07 6:33
jrshack18-Feb-07 6:33 
Questionlistitem tablecell width Pin
loupceuxl17-Feb-07 16:34
loupceuxl17-Feb-07 16:34 
Hi, I'm trying to set the background color for certain listitems in my radiobuttonlist control.
The rbtnl control is inside a repeater. So, for each question, populate x amount of questions.
I want an incorrect answer to have a red background and the correct answer a blue background.
I'm able to set the background colors but I'm not able to set them to the same width since the
listitems correspond to html spans and not tablecells. It will obviously only highlight as
far as the actual text goes. Any ideas?

Here's the code so far:

protected void rpt_questions_OnItemDataBound(object sender, RepeaterItemEventArgs e) {

if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem)) {

... not important code;

DataRowView drv = e.Item.DataItem as DataRowView;

if (drv != null) {

rbtnl_answers.DataTextField = "answer";
rbtnl_answers.DataValueField = "id";
rbtnl_answers.DataSource = drv.CreateChildView("answers");
rbtnl_answers.DataBind();
rbtnl_answers.SelectedValue = choice;

// choice = chosen answer's id
if (choice.Length > 0) {

foreach (ListItem li in rbtnl_answers.Items) {

if ((li.Value == choice) && (correct != choice)) {

li.Attributes["style"] += "background-color: red; color: white;";
}

else if (li.Value == correct) {

li.Attributes["style"] += "background-color: blue; color: white;";
}
}
}
}
QuestionWorking With Word Template From ASP.NET and VB.NET [modified] Pin
Haribabu Krishnamurthy17-Feb-07 7:55
Haribabu Krishnamurthy17-Feb-07 7:55 
JokeRe: Working With Word Template From ASP.NET and VB.NET Pin
Not Active18-Feb-07 3:57
mentorNot Active18-Feb-07 3:57 
QuestionSending mail using SMTP Mail...? Pin
fmlove17-Feb-07 1:15
fmlove17-Feb-07 1:15 
AnswerRe: Sending mail using SMTP Mail...? Pin
Michael Sync17-Feb-07 1:35
Michael Sync17-Feb-07 1:35 
GeneralRe: Sending mail using SMTP Mail...? Pin
fmlove17-Feb-07 1:46
fmlove17-Feb-07 1:46 
AnswerRe: Sending mail using SMTP Mail...? Pin
WoutL17-Feb-07 10:10
WoutL17-Feb-07 10:10 
GeneralRe: Sending mail using SMTP Mail...? Pin
fmlove18-Feb-07 1:50
fmlove18-Feb-07 1:50 
AnswerRe: Sending mail using SMTP Mail...? Pin
Abisodun18-Feb-07 7:14
Abisodun18-Feb-07 7:14 
GeneralRe: Sending mail using SMTP Mail...? Pin
fmlove18-Feb-07 20:40
fmlove18-Feb-07 20:40 
GeneralRe: Sending mail using SMTP Mail...? Pin
Abisodun19-Feb-07 1:32
Abisodun19-Feb-07 1:32 
GeneralRe: Sending mail using SMTP Mail...? Pin
fmlove20-Feb-07 21:31
fmlove20-Feb-07 21:31 
GeneralRe: Sending mail using SMTP Mail...? Pin
Abisodun21-Feb-07 1:24
Abisodun21-Feb-07 1:24 
QuestionMaster Page Class Pin
WaleedS17-Feb-07 1:01
WaleedS17-Feb-07 1:01 
AnswerRe: Master Page Class Pin
Michael Sync17-Feb-07 1:32
Michael Sync17-Feb-07 1:32 
QuestionRetrieving the COM class factory for component with CLSID {9BA05972-F6A8-11CF-A442-00A0C90A8F39} failed due to the following error: 80070002 Pin
Rajkumar S. Rajput17-Feb-07 0:58
Rajkumar S. Rajput17-Feb-07 0:58 
QuestionSOAP Pin
Member 383800717-Feb-07 0:21
Member 383800717-Feb-07 0:21 
AnswerRe: SOAP Pin
Michael Sync17-Feb-07 1:39
Michael Sync17-Feb-07 1:39 

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.