usercontrols

List of user controls in similar to WPF ItemsControl

I have two lists of data. To represent an "item" I have a custom UserControl (as the item has multiple fields and I want to lay it out correctly on the UserControl). I would like the list to be populated on some type of ListBox by these user controls instead of strings. I have seen people do this in WPF using ItemsControl or some repea...

create user form

hai i create usercontrols in vb.net txtbox,button,namelist edit grid and userform. all contrils working properly. but user form not working. how to use this userform.please give any idea. ...

How To Make UserControl In MasterPage Public For All Child Pages

I have a UserControl which I have added to my web.config <add tagPrefix="BCF" src="~/controls/MyMessageBox.ascx" tagName="error"/> and added to my master page <BCF:error ID="BCError" runat="server" Visible="false" /> Now I need to be able to reference this control AND its public properties from all child pages that use that masterp...

Standalone WPF Filter Control

Most WPF data grid controls around have an inbuilt ability to filter the data shown. I am interested in using that functionality, but disconnect from data grid usage. I'm hoping to find a user control that will return an Expression<Func<T, bool>> that I can use in a LINQ query. Does anyone know of such a user control? ...

WPF: adding a usercontrol to a window

Hi guys, First off, I'm new to WPF and C# so maybe the issue I have is really easy to fix. But I'm kinda stuck at the moment. Let me explain my problem. I have a WPF Window and two usercontrols (Controls and ContentDisplayer). The usercontrol Controls, wich contains some buttons, is added in the XAML of the Window. Nothing special he...

UserControl vs SurfaceWindow

Hi, I am trying to use values i declare inside a UserControl class to change things inside the SurfaceWindow class. Now what i know so far is that i have to use a DependencyProperty to get the value from the UserControl and then put it inside a public string. public string MapValue { get { return (string)GetValue(MapValue...

"The Controls collection cannot be modified because the control contains code blocks"

I am trying to create a simple user control that is a slider. When I add a AjaxToolkit SliderExtender to the user control I get this (*&$#()@# error: Server Error in '/' Application. The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). Description: An unhandled exception occur...

How might a site like Stack Overflow pass user information around in ASP.NET MVC?

Basically, I log into my website using OpenId, very similar to what I am assuming SO does. When I get the information back, I throw it into a database and create my "Registered User". I set my AuthCookie: FormsAuthentication.SetAuthCookie(user.Profile.MyProfile.DisplayName, false); Then I can use this for the User Name. However, I ...

Silverlight or WPF Remote Desktop UserControl

Is there a custom UserControl created in WPF that allows for RDP access. I know there's the ActiveX control for RDP 5.1 but I would prefer something that can be embedded within a Silverlight application. ...

UserControl as an interface, but visible in the Designer

So we have a C# WinForms project with a Form that contains a bazillion UserControls. Each UserControl naturally exposes all the UserControl methods, properties, etc. in addition to its own specific members. I've been thinking that one way to reduce the complexity of dealing with these UserControls is to access them through an interface...

extend a user control

Hello guys, I have a question about extending a custom control which inherits from UserControl. public partial class Item : UserControl { public Item () { InitializeComponent(); } } and I would like to make a control which inherits from Item sg like that public partial class ItemExtended : Item { publ...

MVP and multiple User Controls

I’m trying to use the MVP pattern and I’m running into a design problem. I’m developing an application that will have several UserControls. The UserControls themselves have nothing to do with one another and only represent a subset of the actual model. From what I’ve read, people tend to say you should use one Presenter per View. Thi...

Render User control as string template

what do you think of rendering user control as a string template, basically an implementation like Irenderable implementation do you guys think it has any cons. One of the pros that i came across was that i can use my user controls to simply return the required HTML for ajax calls. ...

UserControl's Event Handler not firing

I dynamically load a UserControl into a View that's in a MultiView control. Although the UserControl adds an event handler, the event never fires. What am I missing here? Thanks! Containing ASPX page: protected override void OnPreRender(EventArgs e) { if (MultiView1.ActiveViewIndex == 2) //If the tab is selected, load control ...

How to create ASP.NET user/server control that uses a list of asp:ListItem as child controls?

I am looking to create a user/server control that will be created with something like the following: <my:MyListControl runat="server"> <asp:ListItem Text="Test1" Value="Test1" /> <asp:ListItem Text="Test2" Value="Test2" /> </my:MyListControl> I am just looking for a start here: Articles or code samples. What base class should I...

Visual Studio Designer is always trying to change my control

I have a somewhat complex UserControl, and Visual Studio 2008 is giving me a rather harmless annoyance when working with it. Every single time I open the control with the Designer, it decides to immediately change some of the harmless values set by the designer - namely the initialization of Size properties. If I save those changes, cl...

Web Application Project @Reference tag

I am converting a web site project to a web application project in VS 2008 and i've run across a query regarding dynamically loading user controls. <%@ Reference Control="~/UserControls/MyUserControl.ascx" %> and then in the page I simply called... Dim ucSupplierDetails As New ASP.usercontrols_myusercontrol_ascx Sadly when updatein...

How to simulate postback in nested usercontrols?

Hi all, I'm doing an asp.net application with one page. In this page, I have one usercontrol defined. This usercontrol has a menu (three buttons) and 3 usercontrols defined too. Depending on the clicked button one of the three usercontrols turn to visible true or false. In these three usercontrols I have a button and a message, and I w...

asp.net: how do I wire up LinkButton-like linking functionality with delegates on a table cell background?

I'm using ASP.NET user controls. I'm passing values to another user control via command arguments through a link button as follows: asp:LinkButton ID="ZoomPhotoLinkButton" CommandArgument='<%#(Eval("conid"))%>' CommandName="PassItemId" runat="server">Zoom It What I really want is to make the entire background cell of my table clickab...

ASP.NET - Cross Page Posting From Custom Control

Hey all, Can I get some help posting across different pages from a custom control? I've created a custom button that raises it's own click event through the following code: Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Const EventName As String = "button_click" Const ArgName As Strin...