TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rameshyadav Medaboina
NA
94
23.5k
radiobuttonlist text and values
Nov 20 2017 2:20 AM
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?
Reply
Answers (
1
)
Redirect based on category
how we can cll exe file in asp.net server