.NETGURU
Trying to set the width of an asptable cell.....
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngfreeforall' list.


Hedrick, James
Hi All,

I have an <asp:table> that I am adding cells and rows to dynamicly. All is
going fine except that I am trying to tell the cell that it's with is 120px
using the cell.width property. Like this:

imagecell = New TableCell()
imagecell.VerticalAlign = VerticalAlign.Top
imagecell.Width = 120 'ERROR

I have also tried using a sting value:
imagecell.Width = "120"

However, both times I get an error stating that is cannot convert type to
.....System.Web.UI.WebControls.Unit.
How can I set the width of a asp table cell? Thanks
James

***********************************************************************
NOTICE: This e-mail message and all attachments transmitted with it may contain legally privileged and confidential information intended solely for the use of the addressee. If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by telephone (404-881-7000) or by electronic mail (Click here to reveal e-mail address), and delete this message and all copies and backups thereof. Thank you.
=======================================================

Reply to this message...
 
    
Tim Heuer
When setting widths/sizes in code, you have to use the class library the
error refers to...this tells it what unit to use (points, pixels, etc.)

Look at the class documentation for details on your particular need.

______________________
Tim Heuer

-----Original Message-----
From: Hedrick, James [mailto:Click here to reveal e-mail address]=20
Sent: Monday, August 19, 2002 8:40 AM
To: aspngfreeforall
Subject: [aspngfreeforall] Trying to set the width of an asptable
cell.....

Hi All,

I have an <asp:table> that I am adding cells and rows to dynamicly. All
is going fine except that I am trying to tell the cell that it's with is
120px using the cell.width property. Like this:

imagecell =3D New TableCell()
imagecell.VerticalAlign =3D VerticalAlign.Top
imagecell.Width =3D 120 'ERROR

I have also tried using a sting value:
imagecell.Width =3D "120"

However, both times I get an error stating that is cannot convert type
to .....System.Web.UI.WebControls.Unit.
How can I set the width of a asp table cell? Thanks
James

***********************************************************************
NOTICE: This e-mail message and all attachments transmitted with it may
contain legally privileged and confidential information intended solely
for the use of the addressee. If the reader of this message is not the
intended recipient, you are hereby notified that any reading,
dissemination, distribution, copying, or other use of this message or
its attachments is strictly prohibited. If you have received this
message in error, please notify the sender immediately by telephone
(404-881-7000) or by electronic mail (Click here to reveal e-mail address), and delete
this message and all copies and backups thereof. Thank you.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D

| ASP.net DOCS =3D http://www.aspng.com/docs
| [aspngfreeforall] member Click here to reveal e-mail address =3D YOUR ID=20
| http://www.asplists.com/aspngfreeforall =3D JOIN/QUIT=20
| news://ls.asplists.com =3D NEWSGROUP

Reply to this message...
 
    
Scott Mahler
Try
imagecell.Width.Pixel(120)

HTH

Scott

-----Original Message-----
From: Hedrick, James [mailto:Click here to reveal e-mail address]=20
Sent: Monday, August 19, 2002 8:40 AM
To: aspngfreeforall
Subject: [aspngfreeforall] Trying to set the width of an asptable
cell.....

Hi All,

I have an <asp:table> that I am adding cells and rows to dynamicly. All
is going fine except that I am trying to tell the cell that it's with is
120px using the cell.width property. Like this:

imagecell =3D New TableCell()
imagecell.VerticalAlign =3D VerticalAlign.Top
imagecell.Width =3D 120 'ERROR

I have also tried using a sting value:
imagecell.Width =3D "120"

However, both times I get an error stating that is cannot convert type
to .....System.Web.UI.WebControls.Unit.
How can I set the width of a asp table cell? Thanks
James

***********************************************************************
NOTICE: This e-mail message and all attachments transmitted with it may
contain legally privileged and confidential information intended solely
for the use of the addressee. If the reader of this message is not the
intended recipient, you are hereby notified that any reading,
dissemination, distribution, copying, or other use of this message or
its attachments is strictly prohibited. If you have received this
message in error, please notify the sender immediately by telephone
(404-881-7000) or by electronic mail (Click here to reveal e-mail address), and delete
this message and all copies and backups thereof. Thank you.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D

| ASP.net DOCS =3D http://www.aspng.com/docs
| [aspngfreeforall] member Click here to reveal e-mail address =3D YOUR ID=20
| http://www.asplists.com/aspngfreeforall =3D JOIN/QUIT=20
| news://ls.asplists.com =3D NEWSGROUP

Reply to this message...
 
    
Russ Nemhauser
ImageCell.Width = Unit.Pixel(120)

[Original message clipped]

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

Reply to this message...
 
 
System.Web.UI.WebControls.TableCell
System.Web.UI.WebControls.Unit
System.Web.UI.WebControls.VerticalAlign




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification