R
rcoco
Hi,
have just tryed this but it seems not to work? where is it wrong?
if(st5.SelectedValue=="Bad Mood")
{
st5.SelectedValue="Images/sad.gif";}
else if(st5.SelectedValue=="Good Mood")
{
st5.SelectedValue="Images/laughing.gif";}
And this is the error I'm getting:
Specified argument was out of the range of valid values. Parameter
name: Images/laughing.gif.
Thanks
st5 is your RadioButtonList
st5=(System.Web.UI.WebControls.RadioButtonList)e.Item.Cells[1].FindControl("rblmood");
so, what do you want to get using
st5.SelectedValue="Images/laughing.gif";
?Sorry I've been away for some time. Yes st5 is my RadioButtonList. I
want the image laughing to come along when good mood is selected.
that's: st5.SelectedValue="Images/laughing.gif";
Thanks.- Hide quoted text -- Show quoted text -
1) SelectedValue is a read-only property and you cannot assign a value
using st5.SelectedValue=...
2) st5 is a RadioButtonList and it cannot be equal to the "Images/
laughing.gif"- Hide quoted text -
- Show quoted text -
Is that the reason I'm getting this error:
Specified argument was out of the range of valid values. Parameter
name: Images/laughing.gif ?
Thanks