Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 9th, 2015, 02:33 PM
Friend of Wrox
Points: 2,876, Level: 22
Points: 2,876, Level: 22 Points: 2,876, Level: 22 Points: 2,876, Level: 22
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Denver, CO, USA.
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default Make user control display property values at design time?

Changing the Text property of a text box in the VS IDE makes the text appear in the test box control in the IDE at design time. So, I have created a user control containing a text box, adding a Prompt property to the control's codebehind to set the Text property of the text box. As expected, the text box displays the value entered in the Prompt property at run time .

But, changing the Prompt property in the VS IDE on the page where the control has been consumed does not change the text box's text at design time. What do I need to do to get the value entered in the Prompt property in the VS IDE to appear in the user control (not the property pane!) at design time? Is this simply not possible?
Reply With Quote
  #2 (permalink)  
Old June 10th, 2015, 03:59 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

This is by design; as far as I know, the UC never responds to properties set in the grid for the control on the parent page.

If this behavior is important, you could build your own server controls. They have limited design time capabilities that may get you far enough. You can also associate control designers with them which give you the full experience that other, built-in controls have too: https://msdn.microsoft.com/en-us/magazine/cc302014.aspx

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!
Reply With Quote
  #3 (permalink)  
Old June 10th, 2015, 08:54 AM
Friend of Wrox
Points: 2,876, Level: 22
Points: 2,876, Level: 22 Points: 2,876, Level: 22 Points: 2,876, Level: 22
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Denver, CO, USA.
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default

Nah - it would just be helpful distinguishing between different instances of the control on the same page during design. Thanks, Imar!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Textbox control Display property begaspnet BOOK: Beginning ASP.NET 4.5.1 : in C# and VB 2 July 1st, 2014 09:12 AM
custom Property Enable & Disable in user control tiks C# 1 August 20th, 2008 09:31 AM
User Control Name in a Text Property laslanid Pro VB.NET 2002/2003 0 February 24th, 2005 04:31 AM
Setting Design time property in webcustom control c_cicilia ASP.NET 1.x and 2.0 Application Design 1 September 23rd, 2004 10:35 PM



All times are GMT -4. The time now is 09:20 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.