usercontrols

ASP.NET How to change Page controls via custom UserControl ?

Hi, I have on my Page a Label control and custom UserControl. I want that, when something appears in the UserControl, it shoud change e.g the Label's Text property (as I mentioned, the Label doesn't belong to the UserControl). How to do that ? ...

Are there any ASP.NET template technologies which can be used both client and server-side?

Currently I'm working with ASP.NET 2.0, which may explain why I'm not as up on this as I might be. However, I don't see a full solution in my Googling of ASP.NET MVC, etc. Here's my background thinking. Firstly, data-bound templates are really useful. I'm currently dealing with lots of legacy code whereby people are building up control...

Parent Control containing child control which is of same type as parent control.

I need to create a asp.net form which needs to show a list of folders where each folder may further contain other folder and file. Like window folder view it can be nested to n-level. I can't use tree view control as some edting and formatting requirement can't be met. The datastructure i am using is not folder view but almost same as f...

How to get InitializeComponent to instantiate a derived control at runtime in a C# control

I have developed a generic TreeList control in C# which combines a TreeView with a ListView to obtain a multi-column TreeView. I would like to use a TreeView derived class for the TreeView portion of the control, but keep the TreeListView control generic. In my TreeListView I have a member variable: protected TreeView treeView; and t...

Add something like ShowDialog to a custom User Control?

When a user selects a button a custom user control is added to the form. This user control provides the ability to enter in some values. How do I wait for the user control to complete before changing the value on my main form? I was thinking of something like this: customControl ylc = new customControl(); ylc.Location = new Point(11,...

Problem loading UserControl with DLL reference in Design View

I have a C# project with a UserControl in it. This user control depends on a particular C++ Mixed mode dll which in turns, acts as a facade to an unmanaged C++ DLL C# C++ Mixed C++ Umnanaged [ main app ] ---> [ myUC ] ---> [ OCShell.dll ] ---> [ OCC.dll ] In the Design View, I cannot add th...

Same UserControl to add/edit/search

Hi, I have a UserControl in WPF that has a couple of fields to Add a New User. Can i use the same control to edit and update too ? ...

Getting the coordinates of a PivotItem when using the Silverlight PivotViewer control with Microsoft Live Labs Pivot

I'm using the Silverlight PivotViewer control in an application I'm writing to display Microsoft Live Labs Pivot content through Silverlight. In my app, I want to handle right-clicks on items and return where inside the image the click occurred. I've already implemented the necessary event handlers and the process of finding which image...

Wpf UserControl and MVVM

I am thinking about writing a WPF User Control for my application. I am using MVVM in my application. User control's may require Dependency Properties that can be set my Parent View. when using MVVM, the idea is that the Parent View will eventually create a binding between the UserControls DP with Parent View's VM) Dependency Properti...

Loading .NET UserControls in IE with .NET 4.0

Hello guys. I've got a legacy app where there's a UserControl which is used as an activex in a web page loaded in IE. Before .NET 4.0, there were security policies and a MMC console for creating code groups, etc. It seems like that is all gone with .NET 4.0. I was wondering if someone could give me some clues on how to update my UserC...

Scaling two Windows Forms controls while keeping the same ratio

I have 2 controls in a resize-able panel (1 datagridview and 1 textbox) with some space betwen and I need them both to scale in all directions with the panel. Problem is, since they're vertically stacked they run into each other when the panel scales vertically. I think I need some way to scale vertically while keeping the same ratio of ...

Can't resolve problem about EntityClient connection inside VS2010.

This is a strange one, i resolved it once but now i can't think what is missing here. I have a library contains 3 SQL CE databases. I created 3 Entity Framework 4 Models for each database. Then i created a library where contains 4 UserControls, 1 of 3 contains the other 3 Controls, and o drop this one control into the MainForm in the Wi...

ActiveX control not showing up properly

I have an activex control which I have written using C#. It is essentially a user control which is being compiled into a dll. When I debug the program with visual studio the forms and controls appear normal. When I embed the control in a webpage using HTML the control functions properly but it does not render correctly. The fonts and pro...

Recommendations for good ways to display user messages in asp.net?

I have an app full of pages and user controls, many of which have one or more label controls on them for displaying various different messages to the user. Example: the AddCompany.ascx user control, normally used on the Company.aspx page (with App.Master MasterPage) has a label on it called "OutOfCreditLabel" with Text="Error: You canno...

Register stylesheet from web control on page with UpdatePanel

What is the best method to register a stylesheet once on a page from a customer web control? Please keep in mind that the page uses an UpdatePanel for async calls. I tried just putting the <link> tag in ScriptManager.RegisterClientScriptBlock(), but I get this error: The script tag registered for type 'MyControl' and key 'MyKey' ...

LDAP vs SQL database for user authentication/user data storage

Hello SO, I am starting to use cakePHP for the first time with a hobby project. It looks like cakePHP supports LDAP easily enough as well as any DB. If the project goes well, I am thinking of letting the general public use the site, which means that there will (potentially) be a lot of users (a lot is relative, I guess, I'd be shocked...

How can I identify which controls are updated in UpdatePanel?

I have a UserControl (UC) which is in an UpdatePanel. When the UC is loaded, I run a recursive method to set tooltip for all Button, LinkButton, and DropDownList in this UC. The problem is sometimes I only update 1 control in the UC such as a DropDownList, but I have to call the recursive method on all controls of the UC. I was wondering...

Best practice for User Control Data Binding - How to achieve this?

Hi folks, I've got an User Control with TextBoxes, Labels, ... . Now I would like to get the same Data Binding Features like I would place the Controls directly on the Form. I tried with an extra Binding Source and Error Provider in the User Control and I tried to make the Properties of my Controls available as an property. Nothing wor...

System.IO.IOException in PresentationFramework.dll on instantiation of a user control in WPF

I have a user control UserControl which is in an assembly Assembly. I have a WPF application which instantiates UserControl in a programmatic way. I have already added a reference to Assembly. However, during runtime I get the ff. exception: Cannot locate resource 'usercontrol.xaml'. at MS.Internal.AppModel.ResourcePart.GetStreamC...

Property from a custom UserControl that is saved in viewstate loses its value

I have a custom control in an aspx page that has a property named Size public int Size { get { return Convert.ToInt32(ViewState["CreativeSize"]); } set { ViewState["CreativeSize"] = value; } } This property is set in the aspx page to a value lets say 500 during a postback called by a Button control that is in the page (not i...