473,411 Members | 2,093 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,411 software developers and data experts.

p class in datagrid

I use visual studio 2003 and win2000.

I use a datagrid in a web form. I would like to give a p tag a special
format using a class called 'question'. I am not able to get it to
work.How do I refer to the class in the css file?

<HEAD>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<link rel="stylesheet" type="text/css" href="mainframe.css" />
</HEAD>
<body>
<div id="ans"><asp:datagrid id="DataGrid1" ShowHeader="False"
GridLines="None" AutoGenerateColumns="False" Height="152px"
Width="216px" runat="server" CSSClass="DataGrid">
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<p class="question"><%# DataBinder.Eval(Container.DataItem, "question")
%></p>
<p><%# DataBinder.Eval(Container.DataItem, "answer") %></p>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid></div>
</body>

Regards,

Jan Nordgreen

Jan 30 '06 #1
0 782

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

Similar topics

1
by: Scott Adams | last post by:
This is an easy question for many of you; I just can't seem to be catching everything. I am trying to create a custom DataGrid class that, of course, inherits from System.Windows.Forms.DataGrid....
1
by: PrinsOlsson | last post by:
I have 2 classes. I want to update an datagrid (grdArtiklar) from another class. How to use the datagrid from the other class? Imports System.IO Imports ByteFX.Data Imports...
1
by: Dion Heskett | last post by:
How can I pass a Class as a parameter to in a method ? i.e. Private myMethod( string pram1, Classobject as pram2) { Classobject.DataSource = reader; Classobject.DataBind(); }
3
by: Richard | last post by:
I have a requirement to put a GDI style circle or rectangle border around the selected row of a datagrid/ It will overlap into the row above and below the selected row. Doing this in a the OnPaint...
5
by: Sanddevil | last post by:
Hi there - I hope someone out there can help me! I'm using a .Net DataGrid Class to show the results of a SQL query in a spreadsheet type control. The code, which works fine is: iRowCount =...
0
by: Daniel Melo | last post by:
I have been looking for the solution of this problem for several months and I could not solve. I will try to post something again : Facts : a) I have a custom web control derived from...
8
by: tshad | last post by:
I cannot seem to get the asp:textbox to use classes. Style works fine. I am trying to set the textbox to act like a label in some instance so it doesn't have a border, readonly and the background...
8
by: Franck Diastein | last post by:
Hi, I'm using DataGrid a lot, and I would like to make a class with DataGrid extended properties... I make a class like this: ------------------------------------------------------ using...
3
by: moondaddy | last post by:
I'm wanting to create a bindable list object made up of a list of business classes. I'm writing this in a vb.net 1.1 winforms app and am using a code example by Rocky Lhotka for reference...
1
by: Jasper Jones | last post by:
I'm really stuck on this, I just can't seem to figure it out. In the code below I read the item property of a Datagrid I have on my form. However, I get an error about the datagrid1 part saying...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.