Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 by Chris Hart, John Kauffman, David Sussman, Chris Ullman; ISBN: 9780764588501
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 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 June 4th, 2007, 03:22 PM
Registered User
 
Join Date: Jun 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to vegeta4ss
Default examples of dynamic user control

I am working on a user control that will display the # of "services" that we are running and will show the name, extension, and start/stop buttons. This data is bounded to a database and then drawn at run time onto the aspx page.

I was reviewing the "newsusercontrol" sample from chapter 10. But am unable to modify this to work for me and have a few specific questions..

- I have my sqldatasource1 in the .ascx file yet when i start my application it will not pass the "exename" through to the control and I get a "Invalid value for parameter name." error. I dont understand how it is not getting the connection.

- For displaying a control that consists of 4 labels (2 of which output) and two buttons should I use a datalist or a repeater?
    - If the datalist how can I absolutely position the template
      field? The last one I created was just centered on the page
      and blocked a lot out.

- is there a way to display exactly how many records are in the database without specifying a "itemstoshow" constant/property? Would a For (i<rows.EOF) or For(i<rows.count) work the same for me??


Basically at this point the only thing that works for my control is to hardcode the "exename" into the label and then draw it at design time. At that point it will stop or start using the Serviceprocess class. However, even with doing this I cannot get my repeater to work because the db values are not connecting.

Does anyone have another similar example or feel up to trying to debug my solution? Sorry if not much of this makes any sense, I have just started using ASP again for the first time since early 2003 when I did it in school.



 
Old June 4th, 2007, 03:26 PM
Registered User
 
Join Date: Jun 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to vegeta4ss
Default

I forgot to mention this is all in VB.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Create Dynamic User Control Prabhakar_dt ASP.NET 2.0 Professional 1 June 6th, 2007 07:30 AM
Add Windows User control in Web User Control agarwalvidhu C# 0 March 30th, 2006 01:17 AM
Examples of storing user info from db in profiles? bpdsmark ASP.NET 2.0 Basics 0 March 11th, 2006 03:13 PM
Dynamic user control- not able to set values ghari ASP.NET 1.0 and 1.1 Professional 0 January 4th, 2006 01:16 AM
Dynamic user control problem sandeep General .NET 0 September 26th, 2005 09:42 AM





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