Bin totaler Noob in Sachen ASP.Net und steh' gerade wahrscheinlich auf irgendeinem Schlauch (wer den da bloß wieder hingelegt hat

), aber Folgendes funktioniert bei mir wunderbar:
XML-Code:
<div>
<asp:RadioButtonList ID="radioList" runat="server">
<asp:ListItem Selected="True">Wähl mich!</asp:ListItem>
<asp:ListItem>Wähl mich bloß nicht!</asp:ListItem>
</asp:RadioButtonList>
<asp:Button ID="Button1" runat="server" Text="Postback" />
<div id="div" runat="server">
Gute Wahl.
</div>
</div>
Code:
protected void Page_Load(object sender, EventArgs e)
{
bool first = true;
foreach (ListItem item in radioList.Items) {
item.Attributes.Add("onclick",
string.Format("Visuality('div',{0}) ;", first.ToString().ToLower()));
first = false;
}
if (radioList.SelectedIndex != 0)
div.Style.Add(HtmlTextWriterStyle.Display, "none");
}