473,385 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

radio button in datalist

i am selectin some data from database and through reader showing it in
datalist as above now for radio buttons i have single column which returns
1,2,3 and according to that i want one of above radio button to be
preselected in this datalist how can i do that
doing something like this
but this gives error "The type or namespace name 'rdbtn' could not be found
(are you missing a using directive or an assembly reference?)"
as its in datalist

<table width="100%">
<tr width="100%">
<td width="25%"><%#DataBinder.Eval(Container.DataItem, "FName")%></td>
<td width="25%"><input type=text name="txtPass"
value='<%#DataBinder.Eval(Container.DataItem,"Pass wd")%>'></td>
<td width="45%" align="left">

<input type=hidden name="txtPerm"
value='<%#DataBinder.Eval(Container.DataItem,"Perm ission")%>'>
<%string x=Request.Form.Get("txtPerm");%>
<% if(x=="1")
{
rdbtn.SelectedValue="1";
}
else if(x=="2")
{
rdbtn.SelectedValue="2";
}
else if(x=="3")
{
rdbtn.SelectedValue="3";
}%>
</td>
<td width="5%" align="left">
</td>
</tr>
</table>
Apr 25 '06 #1
1 2027
Hi Vikas,

Thank you for posting.

Regarding on this issue, I've also found your another duplicated one in the
following newsgroup:

Subject: selecting radio button in datalist
Date: Tue, 25 Apr 2006 17:38:14 +0530
Newsgroups: microsoft.public.dotnet.framework.aspnet

I've posted my response and some suggestion there. I'd appreciate if you
have a look there. Also, if you feel it convenient that we continue to
discuss in that thread, please feel free to post there.

Regards,

Steven Cheng
Microsoft Online Community Support
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Apr 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: darkelf | last post by:
Hello I have a aspx page with a two datalist controls. Inside them I have some radio buttons that are created with data binding for the user to choose. It displays a question and user has to choose...
0
by: manu_srinivasa | last post by:
:( Here is my design, we have user control placed in a aspx page. within user control, i am having datalist, within datalist i am placing radio button. On click of radio button, i need to...
0
by: pierre.basson | last post by:
Hi, I have a DataList that contains an image and 3 radio buttons. The radio buttons are used to change the status of the image i.e. Approved, Suspended and Deleted. When the form loads, I want...
1
by: pierre.basson | last post by:
Hi, I have a DataList that contains an image and 3 radio buttons. The radio buttons are used to change the status of the image i.e. Approved, Suspended and Deleted. When the form loads, I want...
3
by: pierre.basson | last post by:
Hi, I have a DataList with an Item Template that contains an image and three radio buttons, which are used to indicate the image's status. How can I set the appropriate radio button to checked,...
0
by: David Hearn | last post by:
I have a datalist with an ItemTemplate set up. In the item template, I have a radio button. I have set the groupname on the radio button so that you should only be able to have one radio button...
3
by: David Hearn | last post by:
I have a datalist that I have inserted a radio button into. The datalist populates with a list of items and each one has a radio button next to it. I need to use the radio button to allow the user...
2
by: cindy | last post by:
When my datalist loads I am trying to make the checked value in a radio button group reflect which value is stored in the data and then fire and event when the CheckChanged event fires. private...
16
by: Vikas Kumar | last post by:
i am selectin some data from database and through reader showing it in datalist as above now for radio buttons i have single column which returns 1,2,3 and according to that i want one of above...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.