Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
radiobuttonlist text and values
Rameshyadav Medaboina
6y
154
1
Reply
How to save values into databse and access Text into gridview with radiobuttonlist controls.
here my code is
<
b
>
Gender:
</
b
>
<
asp:RadioButtonList
ID
=
"RdblGender"
runat
=
"server"
>
<
asp:ListItem
Text
=
"Male"
Value
=
"M"
>
</
asp:ListItem
>
<
asp:ListItem
Text
=
"FeMale"
Value
=
"F"
>
</
asp:ListItem
>
</
asp:RadioButtonList
>
<
br
/>
<
br
/>
<
asp:Button
ID
=
"btnSave"
runat
=
"server"
Text
=
"Save"
onclick
=
"btnSave_Click"
/>
<
asp:GridView
ID
=
"gridview1"
runat
=
"server"
Width
=
"100%"
AutoGenerateColumns
=
"false"
DataKeyNames
=
"Id"
OnRowEditing
=
"gridview1_RowEditing"
OnRowDeleting
=
"gridview1_RowDeleting"
OnRowUpdating
=
"gridview1_RowUpdating"
OnRowCancelingEdit
=
"gridview1_RowCancelingEdit"
OnRowDataBound
=
"gridview1_RowDataBound"
>
<
Columns
>
<
asp:TemplateField
HeaderText
=
"Gender"
>
<
ItemTemplate
>
<
%#Eval("Gender")%
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
asp:RadioButtonList
ID
=
"rdblEditGender"
runat
=
"server"
>
<
asp:ListItem
Text
=
"Male"
Value
=
"Male"
>
</
asp:ListItem
>
<
asp:ListItem
Text
=
"FeMale"
Value
=
"FeMale"
>
</
asp:ListItem
>
</
asp:RadioButtonList
>
<
asp:Label
ID
=
"lblGender"
runat
=
"server"
Text
=
'<%#Eval("Gender")%>'
Visible
=
"false"
/>
</
EditItemTemplate
>
</
asp:TemplateField
>
</
Columns
>
</
asp:GridView
>
here radiobutton values "M","F" are stored into Databse and access gridview by Text "Male","FeMale", How?
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Redirect based on category
how we can cll exe file in asp.net server