usercontrols

Silverlight navigation app usercontrol state

I have a navigation app with 5 pages. I also have a usercontrol with 3 radio buttons. This usercontrol is used by all 5 pages in my app. By default the first radio button is selected. However if the user clicks the 3rd radio button and I go to another page I want my usercontrol to still show that 3rd radio button as selected. How...

Setting properties on a user control inside a foreach loop

I have a user control that I use on multiple pages to show information about an object. Whenever I need to use this usercontrol, I call a method called Display (on the usercontrol) and pass in some values. public void Display(string name, List<Items> items) { // Set a few protected properties so I can display values from the aspx pa...

ASP.NET development - User Control use best practise

In my current project, we use lots of user controls. Large user controls (500+ lines code) are breaked up to a few small user controls for easy maintenance. My question is: most of the user controls are not reusable in other places, but this kind of user control based development complicate the communication between controls, e.g. event...

C# .NET Compact Framework, custom UserControl, focus issue

I have a custom UserControl (a label and a textbox). My problem is I need to handle the key down, key up events to navigate between controls in the form (.NET Compact Framework textbox, combobox, etc). With the controls provided by the .NET Compact Framework framework it works, but when I reach a usercontrol written by me, that control ...

welcome.ascx not rendered by render method on Sharepoint masterpage

Hi all, I have the following problem: writing this method on a sharepoint default masterpage (blueband.master) protected override void Render(HtmlTextWriter output) { StringWriter w; w = new StringWriter(); HtmlTextWriter myoutput = new HtmlTextWriter(w); base.Render(myoutput); myoutput.Close(); m_sXHTML = w....

WPF: TextBox Text is not updating.

I have a user control that i am using inside a Data Template, this user control contains a TextBox which is binded with Value property(declared as a Dependency Property) of my user control. In data template i bind this Value property with my actual property say Name(also a Dependency Property). It works properly, i assign a value to Name...

Visual Studio overwriting UserControl parent when not inheriting System.Windows.Controls.UserControl

I am creating a series of UserControls that all have some similar business logic. So I tried to implement this common business logic in an abstract base class that all of these user controls would inherit from. The inheritance chain looks something like this: System.Windows.Controls.UserControl <-- MyControlBase (abstract)<--MyControl1,...

Using the same usercontrol across all pages of a Silverlight Nav App

I have about 20 pages in my Silverlight nav app. I have 1 usercontrol that I want to use across all 20 pages. I also need the state of the usercontrol to look the same across the 20 pages. So for example if they are on page 1 of the app and they change the background color of the usercontrol it will be the same color across the other ...

ContentPresenter not showing Usercontrol, how come?

Hello; I have a listbox that displays a number of usercontrols that are bound to my questions. this is working fine, however i don't want each of the items in the listbox to be selectable, as such i created a blank style and applied it to the ItemContainerStyle. This has resulted in my content to disappear and each item is showing blank....

Is it possible to isolate an ascx controls in a separate project?

Is it possible to isolate an ascx controls in a separate project? I tried to create a project 'class library' and I can not add ascx component. ...

Bind to Property of Parent Element in Silverlight

I am trying to bind a property of an element within a UserControl to a property set on the UserControl itself in Silverlight. I'm sure it should be simple, but I haven't managed to get it working with either RelativeSource or ElementName binding. In this example I want the Rectangle to be Green (or whatever the UserControl's Background p...

ASP.NET: User control with access to the controls that it wraps

I have a bunch of occurrences of this kind of boilerplate code in my ASP.NET project. <div class="inputfield"> <div class="tl"> <span class="tr"><!-- --></span> <span class="ll"><!-- --></span> <div class="lr"> <div class="cntnt"> <asp:TextBox .../> </div> </div> </div> </div> As you may have gu...

problem using UserControl in C#

hi all, i'm new to C#. and just playing around with the UserControl feature. my problem is that i am writing an RTL app (hebrew). when i made a Form with panels in it, containing some TextBox'es & Labels next to them, the alignment at run-time appeared exactly as in design-time. when i took the same panel & put it in a new created UserCo...

ASP.NET User Control Insdie ListView Edti Tempalte

Hi, I have User Controls (.ascx) file and when I place it inside a ListView Edit Template it throws a NullRefreche error (Object reference not set to an instance of an object). Can anyone tell me why? Is it because of a late binding? ...

Winform not rendering control alterations

Hi All :) I've created a winform in c#, I have 3 controls on the pages and another control and is created programmatically on one of the original controls. It's not rendering, so I Changed the background colours of the other controls (they are all bright colours to begin with) and when I run the app the changes have not taken place, I'v...

The best free ASP.Net user controls?

Hi, I'm working now since 2 month with ASP.Net and have round about 400 work hours done with it, so I'm not a newbie, not a pro. I inform very well and found ever and ever user controls with exelent Textboxes here and a very nice designed combobox there, but I wan't more very nice, good and briliant controls I can use on my site for fr...

ASP.NET C# - Removing a column from a datalist

I have a datalist inside a usercontrol that gets loaded into a page where users can customize a report based on some checkboxes. One of the checkboxes, however, is "Hide Worklog" which should hide the worklog column from the result set because it can be quite long and interfere with the report. If I do: datatable1.Columns.Remove("W...

Programmatically using UserControls

I have a project where I made a couple user controls: a Legend, and a Legend Item. On my web page, I am retrieving a collection of information that I want to load into LegendItem controls (setting basic text and color info) And then Add those Items to my Legend control (the Legend control has a Panel on it and I have referenced a Legen...

My control is "not allowed here because it does not extend class 'System.Web.UI.UserControl'"

Hi there So I have another noodle-scratcher (for me anyway). I'm trying to create my own custom control in a CMS I only have partial source code for (i.e. samples the vendor has supplied to me). Basically I have created a class called DataDefinitionContent which extends ControlBase. Now, from what I can garner from the metadata, Contro...

Letting users custom skin

As an exercise, I'm trying to wrap my head around what goes into letting a user custom skin their profile (like myspace as an example). I'm using PHP. Since I'm clueless as to the whole thing, I'm not sure what to ask, but some of my concerns are how complex this is, is it going to require an overhaul of my code, can I separate this part...