Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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 April 12th, 2010, 04:36 PM
Authorized User
 
Join Date: Apr 2010
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Wrap property

Hi, I can't get ItemStyle-Wrap="True" to work on my DetailsView control. The text will not wrap.
Any suggestions? Thanks.
 
Old April 12th, 2010, 04:43 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

To which exercise / chapter number / page number does this refer to?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old April 12th, 2010, 04:55 PM
Authorized User
 
Join Date: Apr 2010
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Wrap

Chapter 14 page 478.
 
Old April 12th, 2010, 05:00 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

That's were the property is listed, but with what code are you having problems?

Can you provide more details? "Does not work" is not enough for me to suggest anything useful...

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old April 12th, 2010, 05:11 PM
Authorized User
 
Join Date: Apr 2010
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Wrap

...<asp:BoundField DataField="Notes" ControlStyle-Height = "200" ControlStyle-Width= "200" HeaderText="Notes" SortExpression="Notes" ItemStyle-HorizontalAlign="Left" HeaderStyle-VerticalAlign="Top">
<ControlStyle Height="200px" Width="200px"></ControlStyle>

<HeaderStyle VerticalAlign="Top"></HeaderStyle>

<ItemStyle Width="200px"/>
</asp:BoundField>
</Fields>
<InsertRowStyle Width="200px" Wrap="True" />
 
Old April 12th, 2010, 05:41 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

We're not magicians here so if you want useful help, please provide more details.

What exactly is not working, what content do you enter, which browser are you using, do you see the correct CSS appear in the final HTML, do you have other CSS that may override this behavior and so on and so forth....

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old April 12th, 2010, 05:51 PM
Authorized User
 
Join Date: Apr 2010
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Smile

I will have to check on the CSS. Thanks for your help.
 
Old April 14th, 2010, 10:22 AM
Authorized User
 
Join Date: Apr 2010
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Wrap property in DetailsView

I will answer my own question. In the DetailsView control I added a template field and replaced it with a multi-line text box. I also replaced other fields with drop down lists. The process is explained in chapter 12.
 
Old April 14th, 2010, 10:33 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Aha, in that case, you may have misundersood the purpose of wrapping. wrap does not turn a text box (<input ype="text" />) into a multi line text aea (<textarea />). As you found out, you need to set the TextMode and then .NET will render the text box or text area.

Wrapping is used to determine the text wrapping of simple text on say, a label.

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old April 14th, 2010, 10:41 AM
Authorized User
 
Join Date: Apr 2010
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default DetailsView Wrap answer

Thanks, I am learning. I don't know why properties like ItemStyle-wrap are listed if they don't work.





Similar Threads
Thread Thread Starter Forum Replies Last Post
No word wrap Will BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 May 24th, 2009 10:28 AM
word wrap in listbox vjyrakesh C# 2005 1 May 22nd, 2008 09:39 AM
Wrap Text sams ASP.NET 1.0 and 1.1 Professional 0 September 20th, 2007 02:12 AM
word wrap.... rupen CSS Cascading Style Sheets 2 January 24th, 2007 03:10 PM





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