Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 27th, 2004, 10:36 AM
Authorized User
 
Join Date: Dec 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to bsausser
Default HorizontalAlign

Platform: VS 2003
Page Type: Code Behind
Lang: C#

Problem:
I can set table properties that are integers, however when I try to set a string property I get an error: Cannot implicity convert type 'string' to 'System.WEb.UI.WebControls.HorizontalAlign'

Example:
Page_Load(...)
{
...
tblTest.BorderWidth = 1;
tblTest.HorizontalAlign = "Center";
...
}

Additional Info: Stupidly, I tried without quotes and also tried using integers (where 0=left; 1=center; 2=right) with equally stupid results.

Brian Sausser, MCP
(858) 229-6129
__________________
Brian Sausser, MCP
(858) 229-6129
 
Old August 27th, 2004, 10:56 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

tblTest.HorizontalAlign = HorizontalAlign.Center

J









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.