| | |
Radio button message
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Jul 2009
Posts: 21
Reputation:
Solved Threads: 0
I have a radio button list and I need to display a lable message when ever user select "A"
i wrote some code in c# but its not working can sombody help me.
i wrote some code in c# but its not working can sombody help me.
ASP Syntax (Toggle Plain Text)
<td align="left" > <asp:RadioButtonList ID="RBl1" runat="server" AutoPostBack="True" CellPadding="2" CellSpacing="5" onselectedindexchanged="RBl1_SelectedIndexChanged"> <asp:ListItem Value="G" Selected="True" >Regular Grants</asp:ListItem> <asp:ListItem Value ="A">ARRA Grants</asp:ListItem> <asp:ListItem Value ="C">Contract</asp:ListItem> </asp:RadioButtonList> </td>
ASP Syntax (Toggle Plain Text)
protected void RBl1_SelectedIndexChanged(object sender, EventArgs e) { if (RBl1.SelectedValue = "A") { mesg.text = "ARRA FUNDS NOT AVAILABLE" ; } else lblmsg.Text=""; MakeSQL(); }
Hello, pt0909.
To compare values you should use "==".
.
Also the property of the label, which you trying to access here:
should start with the capital letter:
C# is case-sensitive.
To compare values you should use "==".
c# Syntax (Toggle Plain Text)
if (RBl1.SelectedValue == "A")
Also the property of the label, which you trying to access here:
c# Syntax (Toggle Plain Text)
mesg.text
c# Syntax (Toggle Plain Text)
mesg.Text
C# is case-sensitive.
So what if you can see the darkest side of me?
No one would ever change this animal I have become
Help me believe it's not the real me
Somebody help me tame this animal
No one would ever change this animal I have become
Help me believe it's not the real me
Somebody help me tame this animal
![]() |
Similar Threads
- how I chang radio button selection ? (Visual Basic 4 / 5 / 6)
- Deselect the Radio Button (PHP)
- radio button (ASP.NET)
- Want to use radio button or menu bar instead of combo box (Java)
- Am not able to get a radio button selection to display in output (PHP)
- Security Settings -> Java permission -> Custom (radio button) -> Java Custom Settings (Web Browsers)
- Problem passing value from radio button to second page. (PHP)
Other Threads in the ASP Forum
- Previous Thread: Eval() Method - Help please
- Next Thread: display records in asp panel page wise
Views: 635 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for ASP
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection calendar changeable connection current database databaseconnection diagnostics dreamweaver excel fso html iis microsoft msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile query record searchbox selectoption server single specfic sqlserver sqlserverconnection toolkit update web webserver windows7





