.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Table format of RadioButtonList

Posted By:      Posted Date: August 23, 2010    Points: 0   Category :ASP.Net

Hi All,

I have radiobuttonlist with 3 listItem, i need to give the table format to radiobuttonlist means it looks like table with row, how can i give, Any idea?

My code:-

<asp:RadioButtonList ID="RbAccount" runat="server" cssClass="Request">
<asp:ListItem Value="update" Selected="True">Change existing account </asp:ListItem>
<asp:ListItem Value="deprovision">Remove an account </asp:ListItem>
<asp:ListItem Value="new" Enabled="false">Create a new account </asp:ListItem>

If i am using this css style, it is giving me border all all the tables i have on page, i just want only this radiobuttonlist, Any idea ?

<style type="text/css">
    border:1px solid black;

View Complete Post

More Related Resource Links

Adding table to a page, but the format lost when I use clear border



I added a table to a page, by default, the table layout is the light border. So, I add my content and the vertical align seems to set to the top. But when I changed it to clear border, the content of the table will set vertical align to center. Is there a way to change this back to top align but with the clear border. I don't think I can do this by what is available in the ribbon. Please advice.

Showing available time slot in table format


I'm currently developing a system for booking of discussion room in a college. This system will allow the staff to help the students to make booking in advanced as well as for instant walk in usage.

I've got a table to keep track of bookings, another for walk in and one for time slot.

For the time slot table, it includes start time slot and end time slot, which is 30 minutes interval for each.

What i'm currently facing is that the system could not display the correct available time slot. I think it's the formula problem which I still can't get it solved.


If the booking time is 8.30am - 9.00am, I have no problem showing the 1st slot as N/A.

But if the time is 8.45am - 9.15am, the system only update the 1st slot as N/A while the 2nd slot still remain as AVAILABLE which is wrong. Because since the time ends at 9.15, I would like the slot 9.00am - 9.30am to be N/A as well.

This would be my code:

for (int x = 0; x < countTimeSlot; x++)
     if (int.Parse(arrEndTimeSlot[x].ToString()) > intBookedStartTime && int.Parse(

Databinding to table that has a custom format

My problem is that I have a different format table for each section in my form. And I would like to bind data to these tables. A repeater I don't think is going to work. It would be great if I can do it like this:<table id="exampleOfWhatIWant" runat="server"> <tr> <td><%# Eval("data") %></td> <td><%# Eval("data") + 1 %></td> </tr> <tr> <td><%# Eval("data") + 2 %></td> </tr> <tr> <td><%# Eval("data") + 3 %></td> <td><%# Eval("data") + 4 %></td> <td><%# Eval("data") + 5 %></td> </tr> </table> Where the "+ 1" is the next record from that datasource --which is bound in code behind. Is there anyway, I can accomplish this without resorting to dynamically created tables (ugh).

How to change data format in result coming from SQL table


On one of my webpage i am displaying datalist in which i am using this label:

<asp:Label ID="nameLabel12a" runat="server" Text='<%# Eval("CreatedOn") %>' />

This label is displaying created on date along with time (10/18/2010 2:45:07 PM), but i would like to display it something like this:

7sec ago

20min ago

30min ago

23 hours ago

10/3/2010 (if the time is more than 24 hours then it should display the date)

how to accomplish this ? please guide me...

move table from excel to sql in pivot format.


Hi All, i have a table in excel as follows and i want to move all records from excel to sql but in pivot format.

field 1              S5803                      S5597                  S5825

A002             S5803_v12009       S5597_v12009        S5825_v12009

-----               --------------           -------------              --------------

and the table i want in sql as :

Code          Contract         MaterialCode

A002             S5803          S5803_v12009

A002             S5597       

How to insert dynamic data into an XML or HTML format table


Hi there,

I have a technical problem as the title described. I need to achieve this by SSIS that means the destination file could be XML or HTML. However, before inserting dynamic data from source, an XML or HTML format table must be predefined. In the final destination file, the predefined table and dynamic data will be both output.

Can anybody give some suggestions or reference links regarding to this? Appreciate it.


Pivot table format reset after refreshment in excel 2007



i create an excel 2007 sheet that contains a pivot table which reads from my AS cube, and i format that pivot table with special formats like adding borders and changing some colors, ... and so.


the next time i need to refresh the pivot table data and when i do so all my formats is reset.


what should I do to disable this functionality ?





Heba El-Desouky

SQL 2008 Pivot using vertical and hortizonal format table



I have 2 tables, where one holds Name and address information in a wide format, second table is a deep version where i have the records with field names (i.e. Date Of Birth) in the value and then another field with the actual value.

I need to merge both tables together to create a new 3rd table and have everything in a wide format, so name and address for one record plus another new column with Date of Birth, so in the end i would just have one row for a person.

i am using sql 2008, i have a very large dataset so need something generic and fast as there are lots of different field names so i would need to add this to the new table as well. The number of fields is not consistent, so need to create this dynamicaly, I also need to run in small batches as the selection causes space issues.

declare @fieldNames varchar(max)
set @fieldNames = stuff((select distinct ',' + incomingfieldName from tmp_other for xml path('')),1,1,'')
declare @sql nvarchar(max)

declare @BatchSize int, @MaxID int, @Iterations int, @I int
set @BatchSize = 10000 -- 1K records at once
select @MaxID = max(Purn) from Tmp_Rank -- get maximum number
set @Iterations = ceiling(@MaxID/@BatchSize) -- this will give us number of iterations to perform.
print 'MaxID: ' + convert(varchar(10),@MaxID) + ' Batch Size:

Content Editor web part -cannot select "Use Predefined Table Format" check box


Can anybody tell me how to create table with their outline?After i create table, the outline doesn't appear.

If i want to add table, i can't select "Use Predefined Table Format" check box.


Thnx in advance



DriveInfo.GetDrive() to return info in table format using SQL CLR


Hello SQL CLR experts,

We're using SQL Server 2008 R2 (French) and Visual Studio 2008.  I'm trying to get a "simple" SQL CLR to work, which calls DriveInfo.GetDrive() and returns drive name, space available and total size into a SQL Table from the UDF GetDriveInfo() defined below. I need help getting the code to work.

I realize that there is already an xp_fixeddrives extended stored procedure that returns only the available space.  I want to return the Total Size of each drive, the volume name, etc.

I based my code on the article http://www.sqlservercentral.com/articles/SQLCLR/65656/ but I want to use DriveInfo.GetDrive() instead of DirectoryInfo.GetFileSystemInfos().  I was successfully able to get the DirectoryInfo assembly from the article to work, but I am having trouble getting my DriveInfo.GetDrive() adaptation to work.

In Visual Studio, I created a new C# SQL Server project and am using the following code:

using System;
using System.IO;
using System.Collections;
using System.Data;
using System.Data.SqlClient;

Export Visio Database Table Names to Excel

If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

How To Set a Date Format In GridView Using ASP.NET 2.0

A very common desire is to set a column of a gridview to display just the month, day and year of a DateTime type. The problem is the by default, the HtmlEncode property of the boundfield attribute (
The problem is that if this field is enabled, you can not pass format information to the boundfield control. That is, if you try the following code, you will not get the desired result.

How to format and update GridView and DataGrid rows using JQuery

The behavior described in this question is as expected. When you set text of a cell in grid, it directly affects HTML that is going to be rendered. When you set text value of a cell, it means that you are setting innerText of the cell. The column that GridView creates for command fields (Edit, Delete and Select) are a (anchor) or button elements. So you can see what will happen if you set text value in that cell. It will wipe out those link or button controls and replace them with simple text string.

Insert value using Table Value Functions

a real gem in Sql Server 2008. mostly people still using Stored procedure may be they shifted to SQL Server but they are not using TVF right now.

Using jQuery to Filter Table Rows

The project is using the .net GridView control, so I had limited control over the output HTML code. Still, I think this code can work for most tables. One thing to notice: you should use the class "filterable" on your table or on one of its parents for the code to work.
First, we need a text box:

RadioButton Groups, Table Rows And NamingContainers in asp.net

The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their name attributes.

RadioButton Groups, Table Rows And NamingContainers

(In which AJAX-enhanced CheckBoxes become more useful than RadioButtons but inheritance saves the day, and a simple RadioButton-derived control establishes the purpose of a control's naming container)

The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their name attributes.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend