.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

how to change dynamically [Bbrowsable] attribute for a property at design time c#

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :.NET Framework
hi,   how to change dynamically  [Browsable] attribute for a property  at design time c#

View Complete Post

More Related Resource Links

Add property to user control design time properties VB windows forms

hi  everyBody,   I've  created a user control that exports a given radGridView to many file formats like Excel, PDF, Csv,... this user control takes the Gridview object as aprobeity Public Class ucExport Private _grdName As RadGridView Private exporter As RadGridViewExcelExporter Private exportVisualSettings As Boolean Dim fileName As String Dim openExportFile As Boolean Public Property grdObj As RadGridView Set(ByVal value As RadGridView) _grdName = value End Set Get Return _grdName End Get End Property End class  how could I add this property to design mode, that's when I click F4, how can I add this to prosperities, rather than code mode  

Change RSS FeedURL property dynamically


Hi ,

I'm using RSSViewer Web part.I have  a dropdown List in my page and it's having Feed URLs which has to pass values to RSS WP.RSS WP is OOTB and my requirement when i change the dropdown value RSS WP has to populate based on the value passed.

It might be Listview WP or a Dropdown....

Can we change the FeedURL for OOTB WP dynamically?

Thanks in advance.



Accessing Property Value of a Custom Control by another Custom Control in Design-time



I created an Extender which has a custom property that drills down a list XML elements from an xml file, where users can select xml elements during design-time. This works perfectly fine. However, my code only has a hardcoded xml filename (source of the xml elements list) and I need to change this by maxing the xml file user-specified.

What I did is that I created another control (panel) which has a custom property that when clicked (through the ellipsis), it will allow a developer to select the xml file which is supposed to be the source xml file that the Extenders shall use. The filedialog from custom panel's property works perfectly fine.

However, my problem now is that when I drag-drop my Extender, I cannot find a way to get the property value of the custom Panel Control which contains the xml filename. I tried creating a static variable which I thought the custom controls can share but VS2010 is breaking.

Please take note that my problem is on Design-time, asp.net.

Appreciate any help. Thanks a lot.

Dhon Nuevo.

Display custom property in propertywindow during design time


Hi there,

I derive a control from an existing one (a treeview) and properties to it. I want these properties to be easily editable during design-time in the properties window of the control.

When I add a public property representing a simple datatype (boolean, integer, ...) the property value can be edited in the property window. But when the datatype is a morge complex object, the property is disabled in the property window and can't be edited.

Below is a sample property which should be used to allow the user of the property to choose a color. What needs to be added to the code to make it work?

  Private _SelectedNodeColor As System.Drawing.Brush
  ''' <summary>
  ''' Gets or sets the SelectedNodeColor.
  ''' </summary>
  ''' <value>SelectedNodeColor</value>
  ''' <returns>SelectedNodeColor</returns>
  ''' <remarks></remarks>
  Public Property

Dynamically change UIHint attribute of Dynamic Control



Can anyone tell me how I can dynamically change the UIHint of a Dynamic Control?  I have this script in the code-behind:


            DataClassesGripDataContext dc = new DataClassesGripDataContext();

            DynamicControlSponsor = (DynamicControl)FormView1.FindControl("DynamicControlSponsor");

            switch (SponsorType)
                case AppConstants.SPONSORTYPEBUSINESS:
                    DynamicControlSponsor.SetAttribute("UIHint", "Company");

                case AppConstants.SPONSORTYPEINDIVIDUAL:

SSIS Dynamic Flat Files (Can't get ConnectionString property to dynamically change)


Hi all,

I am trying to do what many have already tried.  I wish SSIS was made more user friendly in this perspective, but I am trying to have SSIS read a folder directory, and get all the files based on a condition that I've specified.

I was following this link:  http://consultingblogs.emc.com/jamiethomson/archive/2005/05/30/SSIS_3A00_-Enumerating-files-in-a-Foreach-loop.aspx

So I have a For-Each loop, and within it, I have my Data Flow Task which includes a Flat File Source Connection.  The problem is, how do I pass that information to the connection string?  I can see the connection string in the XML file, but for some reason, I cannot access the property "ConnectionString".  The first property I see when I go to the expressions editor is "DelayValidation."  Furthermore, I've seen documents online where it there is a "connectionString" property for the Flat File Source Connection.  Well, I see no such property.

Any help with specific steps would be greatly appreciated.  Also, once I've figured that part out, I need to be able to move the files to another location after they have been put in the SQL Server DB.  This was much easier in coding a vb.net application.

error redoing dashboards: dwd:design-time-name tag or AttributeID change?


hi all,
I have a user who designed some dashboards in Sharepoint 2010/PPS who apparently cannot use the previously created dashboards without dropping and re-adding a recently modified dimension.   This dimension apparently has the same Name and ID properties as the older version however I now see   dwd:design-time-name  tags wrapping around all objects in the newly created AS Database.  Not sure what is going on and how to mitigate these changes.   Furthermore, for *some* attributes of those dimensions, I see that the AttributeID property has changed from one version to another.

any pointers are much appreciated,



Dynamically adding design time arguments to a custom native activity.


In my senario, the activity has a string[] which has an associated DialogPropertyValueEditor.  When entries are added or removed from this array, CacheMetadata() is called on the activity.  What I want to do from here is add or remove arguments for the activity based on the contents of this string[].  These arguments should then be controllable from the designer (ie, associate variables, or vb expressions) in either a rehosted, or native VisualStudio environment.  I'm having some trouble figuring this out.  With WF3 I used the WorkflowParameterBindingCollection.  Anyone tackled this already, or got an idea how it might be accomplished?

SqlDataSource how to change the stored procedures at run time



Is it possible to change the select, insert and update stored procedure of an SqlDataSource at run time. I don't mean to change the definition of the stored procedure, but I mean to change the assignment, i.e. To change the select stored procedure from "selectSP1" to "selectSP2" at run time. Is it possible?



Custom Control Design-Time SiteMap Provider Error


Greetings - I was referred here by MSDN forums hope this is the right place -  

I have a custom control (:WebControl) that renders web.sitemap in a specific way. While it runs error free and produces the expected result, at Design-Time it complains

Error Creating Control - MyControl  The provider 'AspNetXmlSiteMapProvider' specified for the defaultProvider does not exist in the providers collection.

I have discovered that the error is cause by this line of code:

string div = string.Format("<div class='{0}' id='{1}'>{2}</div>", this.CssClass, this.ID.ToString(), EnumerateNodesRecursive(SiteMap.RootNode, level));

or more specifically, by the reference to SiteMap.RootNode - I am not clear what is missing thoough because I have configured the SiteMapProvider in web.config as this:

        <add name="AspNetXmlSiteMapProvider" 
             type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 

Category attribute of user control property does not work correctly in categories tab.



I have a User Control (ascx) and a property which a want to display in my categories tab in Visual Studio in the category named "Styles".

[Category("Styles"), DefaultValue(""), Description("The value for formating something.")]
public String MyFormatProperty
set { /* the code for set */; }
get { /* the code for get */; }

And here is the problem: Actually I do not need a get, because I only have to set the property (write only property). But when I omit the get, the property is displayed in the "Misc" category in the categories tab in Visual Studio. Only when I code the get as well, then the property is displayed correctly in the "Styles" category in the categories tab in Visual Studio.

Does anybody know why? How can I display the category correctly only with set?

Thanks, S.

ASP.NET Designer - How Do I generate this Design-Time Markup?


I want to generate this:
    <x:MyControl id="a" runat="server">
            <x:MyScript .. />

How do I persist custom complex types in design-time


Let's say that I've got one custom webcontrol called MyControl.

public partial class MyControl: WebControl {
public IComplex Complex { get; set; }

The control is a very simple control but it holds an instance of a complex type that is accessable through a property. The property has the propertytype IComplex

public interface IComplex {
string Name { get; set; }
List<IComplex> Children {get;}

Let's say that I am able to pick one of several different types of object that derives from IComplex in design-time and assign it to the controls property "Complex" property.

Naturally I would like to persist this information to the HTML-View in a user-friendly way.

Because we don't know what type the user has picked there is no way to instansiate the type if we don't persist the name of that type. The Type could also contain more properties than the Interface the controls property is refering.

<cc1:MyControl id="MyControl1" runat="server">
<Complex> <!-

dynamically change column names in Crystal reports


I need to develop 3 pages.

On the first page user defines atmost 7 column names to be displayed on the report. I'm saving these names in a Sql DB table 'Columns' with Column_Nm and Column_ID as Table columns.

On the second page I'm retrieving column_Nm from the table and displaying them on the page so that the user enters the data. This data is saved in another table 'Summary' with the Columns column1 through column7.

on the 3rd page I need to show a report of 'Summary' table.

How do I dynamically replace column1 through column7 names with that of 'Column_Nm' on the report?

Any help/suggestions would be appreciated.


Netting C++: EEK!-Time to Design the Mouse


This month begins the design of the actual mouse class for EEK!

Stanley B. Lippman

MSDN Magazine December 2007

Data Binding: Give Your Everyday Custom Collections a Design-Time Makeover


In this article, Paul Ballard shows how you can provide data binding support for your custom collections to enable sorting, searching, and editing in as simple a manner as possible. In addition, he shows how to make all of these features available in the Windows and Web Forms Designers, just like an ADO.NET DataSet.

Paul Ballard

MSDN Magazine August 2005

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend