473,396 Members | 1,738 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,396 software developers and data experts.

Cast to unit.pixel?

Hi,

<asp:TableCell BackColor="#000066" ID="tblcell" Width=?/>

? = source from database

The problem is, i dont know how to cast the data(from source) to unit.pixel.

Have any ideas?

Or have anyone know to set source to the table's width (which is in the
datagrid) by coding with vb.net?

Your help will be appreciated.

Best regards,
GL

Nov 19 '05 #1
2 1411
Daniel <Da****@discussions.microsoft.com> ha scritto:
Hi,

<asp:TableCell BackColor="#000066" ID="tblcell" Width=?/>

? = source from database

The problem is, i dont know how to cast the data(from source) to
unit.pixel.

Have any ideas?


<asp:TableCell BackColor="#000066" ID="tblcell" Width='<%#
Unit.Pixel(Convert.ToInt32(DataBinder.Eval( Container.DataItem,"width"))
%>' />

--
AZ [Microsoft - .NET MVP]
Mia Home page: http://ciclismo.sitiasp.it
Asp.Net community: http://www.aspitalia.com
Il mio blog: http://blogs.aspitalia.com/az
Nov 19 '05 #2
Thank you Andrea.

Best Regards,
GL

"Andrea Zani" wrote:
Daniel <Da****@discussions.microsoft.com> ha scritto:
Hi,

<asp:TableCell BackColor="#000066" ID="tblcell" Width=?/>

? = source from database

The problem is, i dont know how to cast the data(from source) to
unit.pixel.

Have any ideas?


<asp:TableCell BackColor="#000066" ID="tblcell" Width='<%#
Unit.Pixel(Convert.ToInt32(DataBinder.Eval( Container.DataItem,"width"))
%>' />

--
AZ [Microsoft - .NET MVP]
Mia Home page: http://ciclismo.sitiasp.it
Asp.Net community: http://www.aspitalia.com
Il mio blog: http://blogs.aspitalia.com/az

Nov 19 '05 #3

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

Similar topics

3
by: Praveen | last post by:
How to get rid of this error
1
by: Ken Varn | last post by:
This is probably a common question, but bear with me. I am new to this stuff. I want to convert a Unit Width and/or Height to an actual pixel Int32 Width and Height. I was just using the Value...
9
by: Matt Tapia | last post by:
I having a problem that receives the following error: Specified cast is not valid And I need some help. Here is what is happening: I have a form with a drop-down control that contains a list...
7
by: Robson Carvalho Machado | last post by:
Does anyone knows how to CAST this SQL Response into a MemoryStream ?? When executing below code an error message says "Specified cast is not valid" I need to put this into MemoryStream to use it...
2
by: Boki | last post by:
Hi All, For DirectX, we can set the x, y, z, axis, but what is its unit? pixel, or center meter or ? ex: verts.X=150; Best regards, Boki. ///////////////////////////////////////////
1
by: shapper | last post by:
Hello, In a custom control property I have the following: If CStr(ViewState("InfoWidth")) Is Nothing Then ... I am getting the error: Conversion from type 'Unit' to type 'String' is not...
18
by: Erich Meier | last post by:
Hello there, is there any way to set the size of images or table cells in HTML not by pixels but by inches or in millimetres? The problem behind this is that you never know what kind of output...
1
by: shapper | last post by:
Hello, I need to convert an Unit.Pixel variable to string. For example: Unit.Pixel(160px) "160px" How can I do this? Thanks,
2
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, what is the unit of System.Drawing.Size? when i'm writing Size = (1024,784), is it pixel? or something else? Thanks,
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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...

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.